服务指令-请领流程优化调整
This commit is contained in:
parent
9d59f41607
commit
ff2570744a
|
|
@ -518,6 +518,12 @@ public class QingLingServiceImpl implements IQinglingApi {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询请领单信息
|
||||||
|
*
|
||||||
|
* @param queryDto
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
@Override
|
@Override
|
||||||
public IPage<InvoicingQldMainEntity> queryQld(InvoicingQldQueryEntity queryDto, Integer pageNo, Integer pageSize) {
|
public IPage<InvoicingQldMainEntity> queryQld(InvoicingQldQueryEntity queryDto, Integer pageNo, Integer pageSize) {
|
||||||
Page<Object> page = new Page<>(pageNo, pageSize);
|
Page<Object> page = new Page<>(pageNo, pageSize);
|
||||||
|
|
@ -589,6 +595,12 @@ public class QingLingServiceImpl implements IQinglingApi {
|
||||||
return resultPage;
|
return resultPage;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 请领单-请领单物料信息查询
|
||||||
|
*
|
||||||
|
* @param queryDto
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
@Override
|
@Override
|
||||||
public List<InvoicingQldInfoEntity> queryQldWlInfo(InvoicingQldQueryEntity queryDto) {
|
public List<InvoicingQldInfoEntity> queryQldWlInfo(InvoicingQldQueryEntity queryDto) {
|
||||||
if (StringUtils.isBlank(queryDto.getQldNo())) {
|
if (StringUtils.isBlank(queryDto.getQldNo())) {
|
||||||
|
|
@ -597,6 +609,12 @@ public class QingLingServiceImpl implements IQinglingApi {
|
||||||
return invoicingQldInfoMapper.queryWlInfo(queryDto);
|
return invoicingQldInfoMapper.queryWlInfo(queryDto);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 请领单-作废
|
||||||
|
*
|
||||||
|
* @param dto
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
@Override
|
@Override
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public Map<String, String> cancellation(InvoicingQldMainEntity dto) {
|
public Map<String, String> cancellation(InvoicingQldMainEntity dto) {
|
||||||
|
|
@ -621,20 +639,23 @@ public class QingLingServiceImpl implements IQinglingApi {
|
||||||
if ("3".equals(nowStatus)) {
|
if ("3".equals(nowStatus)) {
|
||||||
InvoicingOrdersEntity p_ = new InvoicingOrdersEntity();
|
InvoicingOrdersEntity p_ = new InvoicingOrdersEntity();
|
||||||
p_.setFlowCode("ql_sq");
|
p_.setFlowCode("ql_sq");
|
||||||
p_.setNuId(one.getNuId());
|
p_.setBizId(dto.getQldNo());
|
||||||
p_.setElderId(one.getElderId());
|
Map<String,String> j = invoicingQlOrdersApi.izCanGoOn(p_);
|
||||||
InvoicingOrdersEntity v_ = invoicingQlOrdersApi.getQlOrderInfo(p_);
|
if(!j.get("error_code").equals("0")){
|
||||||
if (v_ != null) {
|
|
||||||
//有单子 但必须 点开始才行
|
|
||||||
if ("N".equals(v_.getIzStart())) {
|
|
||||||
//未点击开始
|
|
||||||
result.put("status", "faild");
|
result.put("status", "faild");
|
||||||
result.put("message", "请先开始指令");
|
result.put("message", j.get("msg"));
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
} else {
|
}
|
||||||
|
//检测是否可作废
|
||||||
|
if ("1".equals(nowStatus)) {
|
||||||
|
InvoicingOrdersEntity p_ = new InvoicingOrdersEntity();
|
||||||
|
p_.setFlowCode("ql_ck");
|
||||||
|
p_.setBizId(dto.getQldNo());
|
||||||
|
Map<String,String> j = invoicingQlOrdersApi.izCanCancel(p_);
|
||||||
|
if(!j.get("error_code").equals("0")){
|
||||||
result.put("status", "faild");
|
result.put("status", "faild");
|
||||||
result.put("message", "未收到指令,无法作废");
|
result.put("message", j.get("msg"));
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -658,12 +679,7 @@ public class QingLingServiceImpl implements IQinglingApi {
|
||||||
//服务指令流程-作废
|
//服务指令流程-作废
|
||||||
InvoicingOrdersEntity orderEntity = new InvoicingOrdersEntity();
|
InvoicingOrdersEntity orderEntity = new InvoicingOrdersEntity();
|
||||||
orderEntity.setBizId(dto.getQldNo());//请领单号
|
orderEntity.setBizId(dto.getQldNo());//请领单号
|
||||||
orderEntity.setNuId(dto.getNuId());
|
|
||||||
orderEntity.setNuName(dto.getNuName());
|
|
||||||
orderEntity.setElderId(dto.getElderId());//长者id
|
|
||||||
orderEntity.setElderName(dto.getElderName());//长者姓名
|
|
||||||
orderEntity.setInitiatorId(sysUser.getEmployessId());//员工id
|
orderEntity.setInitiatorId(sysUser.getEmployessId());//员工id
|
||||||
orderEntity.setInitiatorName(sysUser.getRealname());//员工姓名
|
|
||||||
if ("1".equals(nowStatus)) {
|
if ("1".equals(nowStatus)) {
|
||||||
//已提交直接作废
|
//已提交直接作废
|
||||||
orderEntity.setFlowCode("ql_zf");//指令流程flow_code 看接口有标明
|
orderEntity.setFlowCode("ql_zf");//指令流程flow_code 看接口有标明
|
||||||
|
|
@ -672,7 +688,7 @@ public class QingLingServiceImpl implements IQinglingApi {
|
||||||
if ("3".equals(nowStatus)) {
|
if ("3".equals(nowStatus)) {
|
||||||
//回退单作废
|
//回退单作废
|
||||||
orderEntity.setFlowCode("ql_htzf");//指令流程flow_code 看接口有标明
|
orderEntity.setFlowCode("ql_htzf");//指令流程flow_code 看接口有标明
|
||||||
invoicingQlOrdersApi.flowQlhtzf(orderEntity);
|
invoicingQlOrdersApi.flowQlzf(orderEntity);
|
||||||
}
|
}
|
||||||
invoicingQldMainService.updateById(one);
|
invoicingQldMainService.updateById(one);
|
||||||
result.put("status", "success");
|
result.put("status", "success");
|
||||||
|
|
@ -680,6 +696,12 @@ public class QingLingServiceImpl implements IQinglingApi {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 请领单-单子改为已读
|
||||||
|
*
|
||||||
|
* @param dto
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
@Override
|
@Override
|
||||||
public boolean transRead(InvoicingQldMainEntity dto) {
|
public boolean transRead(InvoicingQldMainEntity dto) {
|
||||||
UpdateWrapper<NuInvoicingQldMain> uw = new UpdateWrapper<>();
|
UpdateWrapper<NuInvoicingQldMain> uw = new UpdateWrapper<>();
|
||||||
|
|
@ -709,6 +731,20 @@ public class QingLingServiceImpl implements IQinglingApi {
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public Map<String, String> confirmReceipt(InvoicingQldMainEntity dto) {
|
public Map<String, String> confirmReceipt(InvoicingQldMainEntity dto) {
|
||||||
Map<String, String> result = Maps.newHashMap();
|
Map<String, String> result = Maps.newHashMap();
|
||||||
|
|
||||||
|
//检测是否已经开始服务
|
||||||
|
{
|
||||||
|
InvoicingOrdersEntity p_ = new InvoicingOrdersEntity();
|
||||||
|
p_.setFlowCode("ql_sh");
|
||||||
|
p_.setBizId(dto.getQldNo());
|
||||||
|
Map<String,String> j = invoicingQlOrdersApi.izCanGoOn(p_);
|
||||||
|
if(!j.get("error_code").equals("0")){
|
||||||
|
result.put("status", "faild");
|
||||||
|
result.put("message", j.get("msg"));
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//检测是否可以正常收货
|
//检测是否可以正常收货
|
||||||
if (!invoicingQldLogService.opeNodeJudgeCanStatus(dto.getQldNo(), "4")) {
|
if (!invoicingQldLogService.opeNodeJudgeCanStatus(dto.getQldNo(), "4")) {
|
||||||
result.put("status", "faild");
|
result.put("status", "faild");
|
||||||
|
|
@ -722,28 +758,6 @@ public class QingLingServiceImpl implements IQinglingApi {
|
||||||
String status = "5";//确认收货
|
String status = "5";//确认收货
|
||||||
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||||
|
|
||||||
//检测是否已经开始服务
|
|
||||||
{
|
|
||||||
InvoicingOrdersEntity p_ = new InvoicingOrdersEntity();
|
|
||||||
p_.setFlowCode("ql_sqr");
|
|
||||||
p_.setNuId(one.getNuId());
|
|
||||||
p_.setElderId(one.getElderId());
|
|
||||||
InvoicingOrdersEntity v_ = invoicingQlOrdersApi.getQlOrderInfo(p_);
|
|
||||||
if (v_ != null) {
|
|
||||||
//有单子 但必须 点开始才行
|
|
||||||
if ("N".equals(v_.getIzStart())) {
|
|
||||||
//未点击开始
|
|
||||||
result.put("status", "faild");
|
|
||||||
result.put("message", "请先开始指令");
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
result.put("status", "faild");
|
|
||||||
result.put("message", "暂无服务指令");
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
//主表改为已收货
|
//主表改为已收货
|
||||||
UpdateWrapper<NuInvoicingQldMain> mainUW = new UpdateWrapper<>();
|
UpdateWrapper<NuInvoicingQldMain> mainUW = new UpdateWrapper<>();
|
||||||
mainUW.eq("qld_no", dto.getQldNo());
|
mainUW.eq("qld_no", dto.getQldNo());
|
||||||
|
|
@ -905,10 +919,29 @@ public class QingLingServiceImpl implements IQinglingApi {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 请领单-回退
|
||||||
|
*
|
||||||
|
* @param dto
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
@Override
|
@Override
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public Map<String, String> orderReturn(InvoicingQldMainEntity dto) {
|
public Map<String, String> orderReturn(InvoicingQldMainEntity dto) {
|
||||||
Map<String, String> result = Maps.newHashMap();
|
Map<String, String> result = Maps.newHashMap();
|
||||||
|
//检测是否已经开始服务
|
||||||
|
{
|
||||||
|
InvoicingOrdersEntity p_ = new InvoicingOrdersEntity();
|
||||||
|
p_.setFlowCode("ql_ck");
|
||||||
|
p_.setBizId(dto.getQldNo());
|
||||||
|
Map<String,String> j = invoicingQlOrdersApi.izCanGoOn(p_);
|
||||||
|
if(!j.get("error_code").equals("0")){
|
||||||
|
result.put("status", "faild");
|
||||||
|
result.put("message", j.get("msg"));
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//检测是否可以正常回退
|
//检测是否可以正常回退
|
||||||
if (!invoicingQldLogService.opeNodeJudgeCanStatus(dto.getQldNo(), "1,4")) {
|
if (!invoicingQldLogService.opeNodeJudgeCanStatus(dto.getQldNo(), "1,4")) {
|
||||||
result.put("status", "faild");
|
result.put("status", "faild");
|
||||||
|
|
@ -924,28 +957,6 @@ public class QingLingServiceImpl implements IQinglingApi {
|
||||||
String status = "3";
|
String status = "3";
|
||||||
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||||
|
|
||||||
//检测是否已经开始服务
|
|
||||||
{
|
|
||||||
InvoicingOrdersEntity p_ = new InvoicingOrdersEntity();
|
|
||||||
p_.setFlowCode("ql_ck");
|
|
||||||
p_.setNuId(one.getNuId());
|
|
||||||
p_.setElderId(one.getElderId());
|
|
||||||
InvoicingOrdersEntity v_ = invoicingQlOrdersApi.getQlOrderInfo(p_);
|
|
||||||
if (v_ != null) {
|
|
||||||
//有单子 但必须 点开始才行
|
|
||||||
if ("N".equals(v_.getIzStart())) {
|
|
||||||
//未点击开始
|
|
||||||
result.put("status", "faild");
|
|
||||||
result.put("message", "请先开始指令");
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
result.put("status", "faild");
|
|
||||||
result.put("message", "未收到指令,无法回退");
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
//日志表插记录
|
//日志表插记录
|
||||||
NuInvoicingQldLog logData = new NuInvoicingQldLog();
|
NuInvoicingQldLog logData = new NuInvoicingQldLog();
|
||||||
logData.setQldNo(dto.getQldNo());//请领单号
|
logData.setQldNo(dto.getQldNo());//请领单号
|
||||||
|
|
@ -968,11 +979,30 @@ public class QingLingServiceImpl implements IQinglingApi {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 请领单-出库(单个/批量)
|
||||||
|
*
|
||||||
|
* @param dto
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
@Override
|
@Override
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public Map<String, Object> outbound(InvoicingQldMainEntity dto) {
|
public Map<String, Object> outbound(InvoicingQldMainEntity dto) {
|
||||||
//出库一次只会有一个出库单了
|
//出库一次只会有一个出库单了
|
||||||
Map<String, Object> map = new HashMap<>();
|
Map<String, Object> map = new HashMap<>();
|
||||||
|
//检测是否已经开始服务
|
||||||
|
{
|
||||||
|
InvoicingOrdersEntity p_ = new InvoicingOrdersEntity();
|
||||||
|
p_.setFlowCode("ql_ck");
|
||||||
|
p_.setBizId(dto.getQldNo());
|
||||||
|
Map<String,String> j = invoicingQlOrdersApi.izCanGoOn(p_);
|
||||||
|
if(!j.get("error_code").equals("0")){
|
||||||
|
map.put("status", "faild");
|
||||||
|
map.put("message", j.get("msg"));
|
||||||
|
return map;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//检测单子状态是否正确
|
//检测单子状态是否正确
|
||||||
if (!invoicingQldLogService.opeNodeJudgeCanStatus(dto.getQldNo(), "1")) {
|
if (!invoicingQldLogService.opeNodeJudgeCanStatus(dto.getQldNo(), "1")) {
|
||||||
map.put("status", "faild");
|
map.put("status", "faild");
|
||||||
|
|
@ -1013,28 +1043,6 @@ public class QingLingServiceImpl implements IQinglingApi {
|
||||||
String status = "4";
|
String status = "4";
|
||||||
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||||
|
|
||||||
//检测是否已经开始服务
|
|
||||||
{
|
|
||||||
InvoicingOrdersEntity p_ = new InvoicingOrdersEntity();
|
|
||||||
p_.setFlowCode("ql_ck");
|
|
||||||
p_.setNuId(one.getNuId());
|
|
||||||
p_.setElderId(one.getElderId());
|
|
||||||
InvoicingOrdersEntity v_ = invoicingQlOrdersApi.getQlOrderInfo(p_);
|
|
||||||
if (v_ != null) {
|
|
||||||
//有单子 但必须 点开始才行
|
|
||||||
if ("N".equals(v_.getIzStart())) {
|
|
||||||
//未点击开始
|
|
||||||
map.put("status", "faild");
|
|
||||||
map.put("message", "请先开始指令");
|
|
||||||
return map;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
map.put("status", "faild");
|
|
||||||
map.put("message", "未收到指令,无法回退");
|
|
||||||
return map;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
//日志表插记录
|
//日志表插记录
|
||||||
NuInvoicingQldLog logData = new NuInvoicingQldLog();
|
NuInvoicingQldLog logData = new NuInvoicingQldLog();
|
||||||
logData.setQldNo(dto.getQldNo());//请领单号
|
logData.setQldNo(dto.getQldNo());//请领单号
|
||||||
|
|
@ -1160,6 +1168,13 @@ public class QingLingServiceImpl implements IQinglingApi {
|
||||||
// return map;
|
// return map;
|
||||||
// }
|
// }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 请领单-调整物料数量
|
||||||
|
* 传请领单号+物料id+物料数量
|
||||||
|
*
|
||||||
|
* @param queryDto
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
@Override
|
@Override
|
||||||
public boolean updateQldWlSl(InvoicingQldQueryEntity queryDto) {
|
public boolean updateQldWlSl(InvoicingQldQueryEntity queryDto) {
|
||||||
if (StringUtils.isBlank(queryDto.getQldNo()) || StringUtils.isBlank(queryDto.getWlId()) || queryDto.getQlNum() == null) {
|
if (StringUtils.isBlank(queryDto.getQldNo()) || StringUtils.isBlank(queryDto.getWlId()) || queryDto.getQlNum() == null) {
|
||||||
|
|
@ -1205,6 +1220,12 @@ public class QingLingServiceImpl implements IQinglingApi {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 请领单-服务指令-开始服务
|
||||||
|
*
|
||||||
|
* @param dto
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
@Override
|
@Override
|
||||||
public Map<String, String> startDirectiveServe(InvoicingQldQueryEntity dto) {
|
public Map<String, String> startDirectiveServe(InvoicingQldQueryEntity dto) {
|
||||||
//delete by caolei 2025-12-25
|
//delete by caolei 2025-12-25
|
||||||
|
|
@ -1270,7 +1291,14 @@ public class QingLingServiceImpl implements IQinglingApi {
|
||||||
return invoicingOrdersApi.beginOrder(p_);
|
return invoicingOrdersApi.beginOrder(p_);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 请领单-服务指令-结束服务
|
||||||
|
*
|
||||||
|
* @param dto
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
@Override
|
@Override
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public Map<String, String> finishDirectiveServe(InvoicingQldQueryEntity dto) {
|
public Map<String, String> finishDirectiveServe(InvoicingQldQueryEntity dto) {
|
||||||
Map<String,String> map = new HashMap();
|
Map<String,String> map = new HashMap();
|
||||||
map.put("error_code","0");
|
map.put("error_code","0");
|
||||||
|
|
|
||||||
|
|
@ -18,18 +18,24 @@ public interface IInvoicingQlOrdersApi {
|
||||||
*/
|
*/
|
||||||
Map<String,String> izCanSubmit(InvoicingOrdersEntity invoicingOrdersEntity);
|
Map<String,String> izCanSubmit(InvoicingOrdersEntity invoicingOrdersEntity);
|
||||||
|
|
||||||
/**
|
|
||||||
* 请领是否可出库
|
|
||||||
* @param invoicingOrdersEntity
|
|
||||||
*/
|
|
||||||
Map<String,String> izCanCk(InvoicingOrdersEntity invoicingOrdersEntity);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 请领是否可重新提交
|
* 请领是否可重新提交
|
||||||
* @param invoicingOrdersEntity
|
* @param invoicingOrdersEntity
|
||||||
*/
|
*/
|
||||||
Map<String,String> izCanReSubmit(InvoicingOrdersEntity invoicingOrdersEntity);
|
Map<String,String> izCanReSubmit(InvoicingOrdersEntity invoicingOrdersEntity);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 请领是否可继续
|
||||||
|
* @param invoicingOrdersEntity
|
||||||
|
*/
|
||||||
|
Map<String,String> izCanGoOn(InvoicingOrdersEntity invoicingOrdersEntity);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 请领是否可作废
|
||||||
|
* @param invoicingOrdersEntity
|
||||||
|
*/
|
||||||
|
Map<String,String> izCanCancel(InvoicingOrdersEntity invoicingOrdersEntity);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 流程中提交时修改业务单号
|
* 流程中提交时修改业务单号
|
||||||
* @param invoicingOrdersEntity
|
* @param invoicingOrdersEntity
|
||||||
|
|
@ -66,10 +72,5 @@ public interface IInvoicingQlOrdersApi {
|
||||||
*/
|
*/
|
||||||
void flowQlzf(InvoicingOrdersEntity invoicingOrdersEntity);
|
void flowQlzf(InvoicingOrdersEntity invoicingOrdersEntity);
|
||||||
|
|
||||||
/**
|
|
||||||
* 请领流程-回退作废 ql_htzf
|
|
||||||
* @param invoicingOrdersEntity
|
|
||||||
*/
|
|
||||||
void flowQlhtzf(InvoicingOrdersEntity invoicingOrdersEntity);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -127,6 +127,12 @@ public class InvoicingOrders implements Serializable {
|
||||||
private Date updateTime;
|
private Date updateTime;
|
||||||
/**是否删除 0未删除 1删除*/
|
/**是否删除 0未删除 1删除*/
|
||||||
private String delFlag;
|
private String delFlag;
|
||||||
|
/**删除日期*/
|
||||||
|
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||||
|
private Date delTime;
|
||||||
|
/**删除人*/
|
||||||
|
private String delEmp;
|
||||||
/**发起人ID*/
|
/**发起人ID*/
|
||||||
private String initiatorId;
|
private String initiatorId;
|
||||||
/**发起人姓名*/
|
/**发起人姓名*/
|
||||||
|
|
|
||||||
|
|
@ -26,6 +26,6 @@ public interface InvoicingOrdersMapper extends BaseMapper<InvoicingOrders> {
|
||||||
List<InvoicingOrders> getPermissionEmps(@Param("directiveIds") String directiveIds);
|
List<InvoicingOrders> getPermissionEmps(@Param("directiveIds") String directiveIds);
|
||||||
List<InvoicingOrders> getFlowList(InvoicingOrdersEntity invoicingOrdersEntity);
|
List<InvoicingOrders> getFlowList(InvoicingOrdersEntity invoicingOrdersEntity);
|
||||||
InvoicingOrders getFlowOne(InvoicingOrders invoicingOrders);
|
InvoicingOrders getFlowOne(InvoicingOrders invoicingOrders);
|
||||||
void updateOrder(InvoicingOrders invoicingOrders);
|
void cancelOrder(InvoicingOrders invoicingOrders);
|
||||||
InvoicingOrders getOrderOne(InvoicingOrders invoicingOrders);
|
InvoicingOrders getOrderOne(InvoicingOrders invoicingOrders);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -205,59 +205,13 @@
|
||||||
</where>
|
</where>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<update id="updateOrder">
|
<update id="cancelOrder">
|
||||||
update nu_biz_nu_invoicing_directive_order
|
update nu_biz_nu_invoicing_directive_order
|
||||||
set update_time = #{updateTime}
|
set del_flag = '1',
|
||||||
<if test="updateEmp != null and updateEmp != ''">
|
del_time = #{delTime},
|
||||||
,update_emp = #{updateEmp}
|
del_emp = #{delEmp},
|
||||||
</if>
|
remarks = #{remarks}
|
||||||
<if test="beginTime != null">
|
where biz_id = #{bizId}
|
||||||
,begin_time = #{beginTime}
|
|
||||||
</if>
|
|
||||||
<if test="izStart != null and izStart != ''">
|
|
||||||
,iz_start = #{izStart}
|
|
||||||
</if>
|
|
||||||
<if test="finishTime != null">
|
|
||||||
,finish_time = #{finishTime}
|
|
||||||
</if>
|
|
||||||
<if test="izFinish != null and izFinish != ''">
|
|
||||||
,iz_finish = #{izFinish}
|
|
||||||
</if>
|
|
||||||
<if test="bizId != null and bizId != ''">
|
|
||||||
,biz_id = #{bizId}
|
|
||||||
</if>
|
|
||||||
<if test="izRollback != null and izRollback != ''">
|
|
||||||
,iz_rollback = #{izRollback}
|
|
||||||
</if>
|
|
||||||
<if test="remarks != null and remarks != ''">
|
|
||||||
,remarks = #{remarks}
|
|
||||||
</if>
|
|
||||||
<if test="delFlag != null and delFlag != ''">
|
|
||||||
,del_flag = #{delFlag}
|
|
||||||
</if>
|
|
||||||
<where>
|
|
||||||
<if test="id != null and id != ''">
|
|
||||||
and id = #{id}
|
|
||||||
</if>
|
|
||||||
<if test="poolId != null and poolId != ''">
|
|
||||||
and pool_id = #{poolId}
|
|
||||||
</if>
|
|
||||||
<if test="bizId != null and bizId != ''">
|
|
||||||
and biz_id = #{bizId}
|
|
||||||
</if>
|
|
||||||
<if test="nuId != null and nuId != ''">
|
|
||||||
and nu_id = #{nuId}
|
|
||||||
</if>
|
|
||||||
<if test="elderId != null and elderId != ''">
|
|
||||||
and elder_id = #{elderId}
|
|
||||||
</if>
|
|
||||||
<if test="directiveId != null and directiveId != ''">
|
|
||||||
and directive_id = #{directiveId}
|
|
||||||
</if>
|
|
||||||
<if test="bizType != null and bizType != ''">
|
|
||||||
and biz_type = #{bizType}
|
|
||||||
</if>
|
|
||||||
</where>
|
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
<select id="getOrderOne" resultType="com.nu.modules.biz.invoicing.order.entity.InvoicingOrders">
|
<select id="getOrderOne" resultType="com.nu.modules.biz.invoicing.order.entity.InvoicingOrders">
|
||||||
|
|
|
||||||
|
|
@ -103,48 +103,7 @@ public class QlOrdersServiceImpl extends ServiceImpl<InvoicingOrdersMapper, Invo
|
||||||
io.setElderId(invoicingOrdersEntity.getElderId());
|
io.setElderId(invoicingOrdersEntity.getElderId());
|
||||||
io.setIzFinish("N");
|
io.setIzFinish("N");
|
||||||
io.setDelFlag("0");
|
io.setDelFlag("0");
|
||||||
io.setBizType(invoicingOrdersEntity.getFlowCode());
|
io.setIzRollback("N");
|
||||||
io.setIzEmptyNo("Y");
|
|
||||||
InvoicingOrders entity = baseMapper.getOrderOne(io);
|
|
||||||
if(entity!=null){
|
|
||||||
if(!"Y".equals(entity.getIzStart())) {
|
|
||||||
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 请领是否可出库
|
|
||||||
* @param invoicingOrdersEntity
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public Map<String,String> izCanCk(InvoicingOrdersEntity invoicingOrdersEntity){
|
|
||||||
log.info("function:izCanCk");
|
|
||||||
log.info("FlowCode:"+invoicingOrdersEntity.getFlowCode());
|
|
||||||
log.info("NuId:"+invoicingOrdersEntity.getNuId());
|
|
||||||
log.info("ElderId:"+invoicingOrdersEntity.getElderId());
|
|
||||||
Map<String,String> map = new HashMap();
|
|
||||||
map.put("error_code","0");
|
|
||||||
map.put("msg","可以提交");
|
|
||||||
List<InvoicingOrders> flowList = baseMapper.getFlowList(invoicingOrdersEntity);
|
|
||||||
if(flowList!=null) {
|
|
||||||
InvoicingOrders flow = flowList.get(0);
|
|
||||||
log.info("DirectiveId:"+flow.getDirectiveId());
|
|
||||||
InvoicingOrders io = new InvoicingOrders();
|
|
||||||
io.setDirectiveId(flow.getDirectiveId());
|
|
||||||
io.setNuId(invoicingOrdersEntity.getNuId());
|
|
||||||
io.setElderId(invoicingOrdersEntity.getElderId());
|
|
||||||
io.setIzFinish("N");
|
|
||||||
io.setDelFlag("0");
|
|
||||||
io.setBizType(invoicingOrdersEntity.getFlowCode());
|
io.setBizType(invoicingOrdersEntity.getFlowCode());
|
||||||
io.setIzEmptyNo("Y");
|
io.setIzEmptyNo("Y");
|
||||||
InvoicingOrders entity = baseMapper.getOrderOne(io);
|
InvoicingOrders entity = baseMapper.getOrderOne(io);
|
||||||
|
|
@ -195,6 +154,71 @@ public class QlOrdersServiceImpl extends ServiceImpl<InvoicingOrdersMapper, Invo
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 请领是否可继续
|
||||||
|
* @param invoicingOrdersEntity
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Map<String,String> izCanGoOn(InvoicingOrdersEntity invoicingOrdersEntity){
|
||||||
|
log.info("function:izCanGoOn");
|
||||||
|
log.info("FlowCode:"+invoicingOrdersEntity.getFlowCode());
|
||||||
|
log.info("BizId:"+invoicingOrdersEntity.getBizId());
|
||||||
|
Map<String,String> map = new HashMap();
|
||||||
|
map.put("error_code","0");
|
||||||
|
map.put("msg","可以继续");
|
||||||
|
InvoicingOrders io = new InvoicingOrders();
|
||||||
|
io.setIzFinish("N");
|
||||||
|
io.setDelFlag("0");
|
||||||
|
io.setIzRollback("N");
|
||||||
|
io.setBizType(invoicingOrdersEntity.getFlowCode());
|
||||||
|
io.setBizId(invoicingOrdersEntity.getBizId());
|
||||||
|
InvoicingOrders entity = baseMapper.getOrderOne(io);
|
||||||
|
if(entity!=null){
|
||||||
|
if(!"Y".equals(entity.getIzStart())) {
|
||||||
|
map.put("error_code", "1");
|
||||||
|
map.put("msg", "工单未开始");
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
map.put("error_code","1");
|
||||||
|
map.put("msg","工单不存在");
|
||||||
|
}
|
||||||
|
return map;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 请领是否可作废
|
||||||
|
* @param invoicingOrdersEntity
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Map<String,String> izCanCancel(InvoicingOrdersEntity invoicingOrdersEntity){
|
||||||
|
log.info("function:izCanCancel");
|
||||||
|
log.info("FlowCode:"+invoicingOrdersEntity.getFlowCode());
|
||||||
|
log.info("BizId:"+invoicingOrdersEntity.getBizId());
|
||||||
|
Map<String,String> map = new HashMap();
|
||||||
|
map.put("error_code","0");
|
||||||
|
map.put("msg","可以作废");
|
||||||
|
InvoicingOrders io = new InvoicingOrders();
|
||||||
|
io.setDelFlag("0");
|
||||||
|
io.setIzRollback("N");
|
||||||
|
io.setBizType(invoicingOrdersEntity.getFlowCode());
|
||||||
|
io.setBizId(invoicingOrdersEntity.getBizId());
|
||||||
|
InvoicingOrders entity = baseMapper.getOrderOne(io);
|
||||||
|
if(entity!=null){
|
||||||
|
if("Y".equals(entity.getIzStart())) {
|
||||||
|
map.put("error_code", "1");
|
||||||
|
map.put("msg", "工单已开始");
|
||||||
|
}
|
||||||
|
if("Y".equals(entity.getIzFinish())) {
|
||||||
|
map.put("error_code", "1");
|
||||||
|
map.put("msg", "工单已结束");
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
map.put("error_code","1");
|
||||||
|
map.put("msg","工单不存在");
|
||||||
|
}
|
||||||
|
return map;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void updateOrderBizId(InvoicingOrdersEntity invoicingOrdersEntity){
|
public void updateOrderBizId(InvoicingOrdersEntity invoicingOrdersEntity){
|
||||||
log.info("function:updateOrderBizId");
|
log.info("function:updateOrderBizId");
|
||||||
|
|
@ -375,107 +399,25 @@ public class QlOrdersServiceImpl extends ServiceImpl<InvoicingOrdersMapper, Invo
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 请领出库作废,未完成未作废的出库指定工单。
|
* 请领作废,包括回退作废。
|
||||||
* @param invoicingOrdersEntity
|
* @param invoicingOrdersEntity
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void flowQlzf(InvoicingOrdersEntity invoicingOrdersEntity){
|
public void flowQlzf(InvoicingOrdersEntity invoicingOrdersEntity){
|
||||||
|
|
||||||
log.info("function:flowQlzf");
|
log.info("function:flowQlzf");
|
||||||
log.info("BizId:"+invoicingOrdersEntity.getBizId());
|
log.info("BizId:"+invoicingOrdersEntity.getBizId());
|
||||||
log.info("UpdateBy:"+invoicingOrdersEntity.getInitiatorId());
|
log.info("UpdateBy:"+invoicingOrdersEntity.getInitiatorId());
|
||||||
|
|
||||||
empOrdersService.getNames(invoicingOrdersEntity);
|
|
||||||
InvoicingOrdersEntity flowCode = new InvoicingOrdersEntity();
|
|
||||||
flowCode.setFlowCode("ql_ck");
|
|
||||||
List<InvoicingOrders> flowList = baseMapper.getFlowList(flowCode);
|
|
||||||
if(flowList!=null){
|
|
||||||
InvoicingOrders flow = flowList.get(0);
|
|
||||||
|
|
||||||
log.info("DirectiveId:"+flow.getDirectiveId());
|
|
||||||
log.info("NuId:"+invoicingOrdersEntity.getNuId());
|
|
||||||
log.info("ElderId:"+invoicingOrdersEntity.getElderId());
|
|
||||||
|
|
||||||
QueryWrapper<InvoicingOrders> ioQw = new QueryWrapper<>();
|
|
||||||
ioQw.eq("directive_id", flow.getDirectiveId());
|
|
||||||
ioQw.eq("nu_id", invoicingOrdersEntity.getNuId());
|
|
||||||
ioQw.eq("elder_id", invoicingOrdersEntity.getElderId());
|
|
||||||
// ioQw.eq("iz_start", "N");
|
|
||||||
ioQw.eq("iz_finish", "N");
|
|
||||||
ioQw.eq("del_flag", "0");
|
|
||||||
ioQw.eq("iz_rollback", "N");
|
|
||||||
ioQw.eq("biz_type", "ql_ck");
|
|
||||||
ioQw.eq("biz_id", invoicingOrdersEntity.getBizId());
|
|
||||||
InvoicingOrders order = this.getOne(ioQw);
|
|
||||||
log.info("order:"+order);
|
|
||||||
if(order!=null){
|
|
||||||
log.info("OrderId:"+order.getId());
|
|
||||||
Calendar c = Calendar.getInstance();
|
|
||||||
InvoicingOrders entity = new InvoicingOrders();
|
InvoicingOrders entity = new InvoicingOrders();
|
||||||
entity.setId(order.getId());
|
entity.setBizId(invoicingOrdersEntity.getBizId());
|
||||||
entity.setDelFlag("1");
|
entity.setDelEmp(invoicingOrdersEntity.getInitiatorId());
|
||||||
// entity.setIzFinish("N");
|
entity.setDelTime(new Date());
|
||||||
// entity.setFinishTime(c.getTime());
|
entity.setRemarks("请领工单作废");
|
||||||
entity.setUpdateEmp(invoicingOrdersEntity.getInitiatorId());
|
baseMapper.cancelOrder(entity);
|
||||||
entity.setUpdateTime(c.getTime());
|
|
||||||
entity.setRemarks("请领申请作废");
|
|
||||||
baseMapper.updateOrder(entity);
|
|
||||||
|
|
||||||
|
if(invoicingOrdersEntity.getFlowCode().equals("ql_zf")){
|
||||||
//ws推送库管通知
|
//ws推送库管通知
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 请领出库回退作废,
|
|
||||||
* @param invoicingOrdersEntity
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public void flowQlhtzf(InvoicingOrdersEntity invoicingOrdersEntity){
|
|
||||||
|
|
||||||
log.info("function:flowQlhtzf");
|
|
||||||
log.info("BizId:"+invoicingOrdersEntity.getBizId());
|
|
||||||
log.info("UpdateBy:"+invoicingOrdersEntity.getInitiatorId());
|
|
||||||
|
|
||||||
empOrdersService.getNames(invoicingOrdersEntity);
|
|
||||||
InvoicingOrdersEntity flowCode = new InvoicingOrdersEntity();
|
|
||||||
flowCode.setFlowCode("ql_sq");
|
|
||||||
List<InvoicingOrders> flowList = baseMapper.getFlowList(flowCode);
|
|
||||||
if(flowList!=null){
|
|
||||||
InvoicingOrders flow = flowList.get(0);
|
|
||||||
|
|
||||||
log.info("DirectiveId:"+flow.getDirectiveId());
|
|
||||||
log.info("NuId:"+invoicingOrdersEntity.getNuId());
|
|
||||||
log.info("ElderId:"+invoicingOrdersEntity.getElderId());
|
|
||||||
|
|
||||||
QueryWrapper<InvoicingOrders> ioQw = new QueryWrapper<>();
|
|
||||||
ioQw.eq("directive_id", flow.getDirectiveId());
|
|
||||||
ioQw.eq("nu_id", invoicingOrdersEntity.getNuId());
|
|
||||||
ioQw.eq("elder_id", invoicingOrdersEntity.getElderId());
|
|
||||||
ioQw.eq("iz_finish", "N");
|
|
||||||
ioQw.eq("iz_rollback", "Y");
|
|
||||||
ioQw.eq("del_flag", "0");
|
|
||||||
ioQw.eq("biz_type", "ql_sq");
|
|
||||||
ioQw.eq("biz_id", invoicingOrdersEntity.getBizId());
|
|
||||||
InvoicingOrders order = this.getOne(ioQw);
|
|
||||||
log.info("order:"+order);
|
|
||||||
if(order!=null){
|
|
||||||
log.info("OrderId:"+order.getId());
|
|
||||||
Calendar c = Calendar.getInstance();
|
|
||||||
InvoicingOrders entity = new InvoicingOrders();
|
|
||||||
entity.setId(order.getId());
|
|
||||||
entity.setDelFlag("1");
|
|
||||||
// entity.setIzFinish("Y");
|
|
||||||
// entity.setFinishTime(c.getTime());
|
|
||||||
entity.setUpdateEmp(invoicingOrdersEntity.getInitiatorId());
|
|
||||||
entity.setUpdateTime(c.getTime());
|
|
||||||
entity.setRemarks("请领回退作废");
|
|
||||||
baseMapper.updateOrder(entity);
|
|
||||||
|
|
||||||
//ws推送库管通知
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 增加下一步的工单
|
* 增加下一步的工单
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue