服务指令-请领工单开始,结束,获取
This commit is contained in:
parent
eb98331dd1
commit
13ed3f6a87
|
|
@ -13,17 +13,23 @@ import java.util.Map;
|
|||
*/
|
||||
public interface IInvoicingOrdersApi {
|
||||
|
||||
/**
|
||||
* 获取指令工单信息
|
||||
* @param invoicingOrdersEntity
|
||||
*/
|
||||
InvoicingOrdersEntity getOrderInfo(InvoicingOrdersEntity invoicingOrdersEntity);
|
||||
|
||||
/**
|
||||
* 点击开始
|
||||
* @param invoicingOrdersEntity
|
||||
*/
|
||||
void beginOrder(InvoicingOrdersEntity invoicingOrdersEntity);
|
||||
Map<String,String> beginOrder(InvoicingOrdersEntity invoicingOrdersEntity);
|
||||
|
||||
/**
|
||||
* 点击完成
|
||||
* @param invoicingOrdersEntity
|
||||
*/
|
||||
void finishOrder(InvoicingOrdersEntity invoicingOrdersEntity);
|
||||
Map<String,String> finishOrder(InvoicingOrdersEntity invoicingOrdersEntity);
|
||||
|
||||
/**
|
||||
* 请领流程-获取指令工单信息
|
||||
|
|
|
|||
|
|
@ -75,21 +75,59 @@ public class InvoicingOrdersServiceImpl extends ServiceImpl<InvoicingOrdersMappe
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取指令工单信息
|
||||
* @param invoicingOrdersEntity
|
||||
*/
|
||||
@Override
|
||||
public InvoicingOrdersEntity getOrderInfo(InvoicingOrdersEntity invoicingOrdersEntity){
|
||||
log.info("function:getOrderInfo");
|
||||
log.info("id:"+invoicingOrdersEntity.getId());
|
||||
log.info("Object:",invoicingOrdersEntity);
|
||||
InvoicingOrders io = new InvoicingOrders();
|
||||
BeanUtils.copyProperties(invoicingOrdersEntity, io);
|
||||
InvoicingOrders entity = baseMapper.getOrderOne(io);
|
||||
if(entity!=null){
|
||||
InvoicingOrdersEntity ioe = new InvoicingOrdersEntity();
|
||||
BeanUtils.copyProperties(entity, ioe);
|
||||
return ioe;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 点击开始
|
||||
* @param invoicingOrdersEntity
|
||||
*/
|
||||
@Override
|
||||
public void beginOrder(InvoicingOrdersEntity invoicingOrdersEntity){
|
||||
Calendar c = Calendar.getInstance();
|
||||
InvoicingOrders entity = new InvoicingOrders();
|
||||
entity.setId(invoicingOrdersEntity.getId());
|
||||
entity.setBeginTime(c.getTime());
|
||||
entity.setIzStart("Y");
|
||||
entity.setUpdateEmp(invoicingOrdersEntity.getInitiatorId());
|
||||
entity.setUpdateTime(c.getTime());
|
||||
entity.setBizType(invoicingOrdersEntity.getFlowCode());
|
||||
baseMapper.updateById(entity);
|
||||
public Map<String,String> beginOrder(InvoicingOrdersEntity invoicingOrdersEntity){
|
||||
log.info("Id:"+invoicingOrdersEntity.getId());
|
||||
log.info("UpdateBy:"+invoicingOrdersEntity.getInitiatorId());
|
||||
Map<String,String> map = new HashMap();
|
||||
map.put("error_code","0");
|
||||
map.put("msg","开始成功");
|
||||
InvoicingOrders io = new InvoicingOrders();
|
||||
BeanUtils.copyProperties(invoicingOrdersEntity, io);
|
||||
InvoicingOrders invoicingOrders = baseMapper.getOrderOne(io);
|
||||
if(invoicingOrders!=null){
|
||||
if(invoicingOrders.getIzStart().equals("N")){
|
||||
Calendar c = Calendar.getInstance();
|
||||
InvoicingOrders entity = new InvoicingOrders();
|
||||
entity.setBeginTime(c.getTime());
|
||||
entity.setIzStart("Y");
|
||||
entity.setUpdateEmp(invoicingOrdersEntity.getInitiatorId());
|
||||
entity.setUpdateTime(c.getTime());
|
||||
entity.setId(invoicingOrdersEntity.getId());
|
||||
baseMapper.updateById(entity);
|
||||
}else{
|
||||
map.put("error_code","1");
|
||||
map.put("msg","工单已开始");
|
||||
}
|
||||
}else{
|
||||
map.put("error_code","1");
|
||||
map.put("msg","此工单不存在");
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -97,22 +135,45 @@ public class InvoicingOrdersServiceImpl extends ServiceImpl<InvoicingOrdersMappe
|
|||
* @param invoicingOrdersEntity
|
||||
*/
|
||||
@Override
|
||||
public void finishOrder(InvoicingOrdersEntity invoicingOrdersEntity){
|
||||
Calendar c = Calendar.getInstance();
|
||||
QueryWrapper<InvoicingOrders> ioQw = new QueryWrapper<>();
|
||||
ioQw.eq("id", invoicingOrdersEntity.getId());
|
||||
InvoicingOrders order = this.getOne(ioQw);
|
||||
InvoicingOrders DirectivePrice = baseMapper.getDirectivePrice(order.getDirectiveId());//获取服务指令价格
|
||||
InvoicingOrders entity = new InvoicingOrders();
|
||||
entity.setId(invoicingOrdersEntity.getId());
|
||||
entity.setFinishTime(c.getTime());
|
||||
entity.setIzFinish("Y");
|
||||
entity.setUpdateEmp(invoicingOrdersEntity.getInitiatorId());
|
||||
entity.setUpdateTime(c.getTime());
|
||||
entity.setBizType(invoicingOrdersEntity.getFlowCode());
|
||||
entity.setTollPrice(DirectivePrice.getTollPrice());
|
||||
entity.setComPrice(DirectivePrice.getComPrice());
|
||||
baseMapper.updateById(entity);
|
||||
public Map<String,String> finishOrder(InvoicingOrdersEntity invoicingOrdersEntity){
|
||||
log.info("Id:"+invoicingOrdersEntity.getId());
|
||||
log.info("UpdateBy:"+invoicingOrdersEntity.getInitiatorId());
|
||||
Map<String,String> map = new HashMap();
|
||||
map.put("error_code","0");
|
||||
map.put("msg","结束成功");
|
||||
InvoicingOrders io = new InvoicingOrders();
|
||||
BeanUtils.copyProperties(invoicingOrdersEntity, io);
|
||||
InvoicingOrders invoicingOrders = baseMapper.getOrderOne(io);
|
||||
if(invoicingOrders!=null){
|
||||
if(invoicingOrders.getIzStart().equals("Y")){
|
||||
if(invoicingOrders.getIzFinish().equals("N")){
|
||||
Calendar c = Calendar.getInstance();
|
||||
QueryWrapper<InvoicingOrders> ioQw = new QueryWrapper<>();
|
||||
ioQw.eq("id", invoicingOrdersEntity.getId());
|
||||
InvoicingOrders order = this.getOne(ioQw);
|
||||
InvoicingOrders DirectivePrice = baseMapper.getDirectivePrice(order.getDirectiveId());//获取服务指令价格
|
||||
InvoicingOrders entity = new InvoicingOrders();
|
||||
entity.setId(order.getId());
|
||||
entity.setFinishTime(c.getTime());
|
||||
entity.setIzFinish("Y");
|
||||
entity.setUpdateEmp(invoicingOrdersEntity.getInitiatorId());
|
||||
entity.setUpdateTime(c.getTime());
|
||||
entity.setTollPrice(DirectivePrice.getTollPrice());
|
||||
entity.setComPrice(DirectivePrice.getComPrice());
|
||||
baseMapper.updateById(entity);
|
||||
}else{
|
||||
map.put("error_code","1");
|
||||
map.put("msg","工单已结束");
|
||||
}
|
||||
}else{
|
||||
map.put("error_code","1");
|
||||
map.put("msg","工单未开始");
|
||||
}
|
||||
}else{
|
||||
map.put("error_code","1");
|
||||
map.put("msg","此工单不存在");
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -121,7 +182,7 @@ public class InvoicingOrdersServiceImpl extends ServiceImpl<InvoicingOrdersMappe
|
|||
*/
|
||||
@Override
|
||||
public InvoicingOrdersEntity getQlOrderInfo(InvoicingOrdersEntity invoicingOrdersEntity){
|
||||
log.info("function:flowQlsq");
|
||||
log.info("function:getQlOrderInfo");
|
||||
log.info("UpdateBy:"+invoicingOrdersEntity.getInitiatorId());
|
||||
List<InvoicingOrders> flowList = baseMapper.getFlowList(invoicingOrdersEntity);
|
||||
if(flowList!=null){
|
||||
|
|
@ -130,7 +191,7 @@ public class InvoicingOrdersServiceImpl extends ServiceImpl<InvoicingOrdersMappe
|
|||
log.info("NuId:"+invoicingOrdersEntity.getNuId());
|
||||
log.info("ElderId:"+invoicingOrdersEntity.getElderId());
|
||||
InvoicingOrders io = new InvoicingOrders();
|
||||
io.setDirectiveId(invoicingOrdersEntity.getDirectiveId());
|
||||
io.setDirectiveId(flow.getDirectiveId());
|
||||
io.setNuId(invoicingOrdersEntity.getNuId());
|
||||
io.setElderId(invoicingOrdersEntity.getElderId());
|
||||
io.setIzFinish("N");
|
||||
|
|
|
|||
Loading…
Reference in New Issue