服务指令-调整接口返回map,注释无用代码,合并工单,暂只合并了护理类,库房还没合并完
This commit is contained in:
parent
d204b0a739
commit
228cd54e29
|
|
@ -43,7 +43,7 @@ public class InvoicingPddApi {
|
|||
return Result.error("参数错误,请选择库房");
|
||||
}
|
||||
Map<String,Object> result = pddApi.addPddMain(invoicingPddMainEntity);
|
||||
if (StringUtils.equals("true",result.get("success").toString())){
|
||||
if ((boolean)result.get("success")){
|
||||
return Result.OK(result.get("message"));
|
||||
}else{
|
||||
return Result.error(result.get("message").toString());
|
||||
|
|
@ -74,7 +74,7 @@ public class InvoicingPddApi {
|
|||
return Result.error("参数错误,请填写盘点数量");
|
||||
}
|
||||
Map<String,Object> result = pddApi.editPddInfo(invoicingPddInfoEntity);
|
||||
if (StringUtils.equals("true",result.get("success").toString())){
|
||||
if ((boolean)result.get("success")){
|
||||
// Map<String,Object> map = new HashMap<>();
|
||||
// map.put("message","操作成功");
|
||||
// map.put("data",result.get("message"));
|
||||
|
|
@ -92,7 +92,7 @@ public class InvoicingPddApi {
|
|||
return Result.error("参数错误,请选择盘点单");
|
||||
}
|
||||
Map<String,Object> result = pddApi.submitPddMain(invoicingPddMainEntity);
|
||||
if (StringUtils.equals("true",result.get("success").toString())){
|
||||
if ((boolean)result.get("success")){
|
||||
return Result.OK(result.get("message"));
|
||||
}else{
|
||||
return Result.error(result.get("message").toString());
|
||||
|
|
@ -119,7 +119,7 @@ public class InvoicingPddApi {
|
|||
return Result.error("参数错误,请选择盘点单");
|
||||
}
|
||||
Map<String,Object> result = pddApi.voidedPddMain(invoicingPddMainEntity);
|
||||
if (StringUtils.equals("true",result.get("success").toString())){
|
||||
if ((boolean)result.get("success")){
|
||||
return Result.OK(result.get("message"));
|
||||
}else{
|
||||
return Result.error(result.get("message").toString());
|
||||
|
|
@ -146,11 +146,11 @@ public class InvoicingPddApi {
|
|||
if (StringUtils.isBlank(dto.getId())) {
|
||||
return Result.error("缺少参数");
|
||||
}
|
||||
Map<String, String> result = pddApi.startDirectiveServe(dto);
|
||||
if ("0".equals(result.get("error_code"))) {
|
||||
return Result.OK(result.get("msg"));
|
||||
Map<String, Object> result = pddApi.startDirectiveServe(dto);
|
||||
if ((boolean)result.get("success")) {
|
||||
return Result.OK(result.get("message"));
|
||||
} else {
|
||||
return Result.error(result.get("msg"));
|
||||
return Result.error(result.get("message").toString());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -167,11 +167,11 @@ public class InvoicingPddApi {
|
|||
if (StringUtils.isBlank(dto.getId())) {
|
||||
return Result.error("缺少参数");
|
||||
}
|
||||
Map<String, String> result = pddApi.finishDirectiveServe(dto);
|
||||
if ("0".equals(result.get("error_code"))) {
|
||||
return Result.OK(result.get("msg"));
|
||||
Map<String, Object> result = pddApi.finishDirectiveServe(dto);
|
||||
if ((boolean)result.get("success")) {
|
||||
return Result.OK(result.get("message"));
|
||||
} else {
|
||||
return Result.error(result.get("msg"));
|
||||
return Result.error(result.get("message").toString());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -226,11 +226,11 @@ public class InvoicingQldApi {
|
|||
if (StringUtils.isBlank(dto.getId())) {
|
||||
return Result.error("缺少参数");
|
||||
}
|
||||
Map<String, String> result = qinglingApi.startDirectiveServe(dto);
|
||||
if ("0".equals(result.get("error_code"))) {
|
||||
return Result.OK(result.get("msg"));
|
||||
Map<String, Object> result = qinglingApi.startDirectiveServe(dto);
|
||||
if ((boolean)result.get("success")) {
|
||||
return Result.OK(result.get("message"));
|
||||
} else {
|
||||
return Result.error(result.get("msg"));
|
||||
return Result.error(result.get("message").toString());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -247,11 +247,11 @@ public class InvoicingQldApi {
|
|||
if (StringUtils.isBlank(dto.getId())) {
|
||||
return Result.error("缺少参数");
|
||||
}
|
||||
Map<String, String> result = qinglingApi.finishDirectiveServe(dto);
|
||||
if ("0".equals(result.get("error_code"))) {
|
||||
return Result.OK(result.get("msg"));
|
||||
Map<String, Object> result = qinglingApi.finishDirectiveServe(dto);
|
||||
if ((boolean)result.get("success")) {
|
||||
return Result.OK(result.get("message"));
|
||||
} else {
|
||||
return Result.error(result.get("msg"));
|
||||
return Result.error(result.get("message").toString());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -265,17 +265,20 @@ public class InvoicingQldApi {
|
|||
@AutoLog(value = "请领单-提交请领单", clientType = "app")
|
||||
@PostMapping(value = "/submitQld")
|
||||
public Result<?> submitQld(@RequestBody InvoicingQldGwcEntity dto) {
|
||||
//判断库房是否正在盘点中
|
||||
Map<String, Object> izPd = pddApi.queryPddStartInfo(null);
|
||||
if (izPd.get("success") != null && !(Boolean) izPd.get("success")) {
|
||||
return Result.error((String) izPd.get("message"));
|
||||
}
|
||||
|
||||
if (StringUtils.isBlank(dto.getNuId()) || StringUtils.isBlank(dto.getElderId())) {
|
||||
return Result.error("缺少参数");
|
||||
}
|
||||
return Result.ok(qinglingApi.submitQld(dto));
|
||||
|
||||
//判断库房是否正在盘点中
|
||||
Map<String, Object> pdResult = pddApi.queryPddStartInfo(null);
|
||||
if (!(boolean)pdResult.get("success")) {
|
||||
return Result.error(pdResult.get("message").toString());
|
||||
}
|
||||
Map<String, Object> result = qinglingApi.submitQld(dto);
|
||||
if ((boolean)result.get("success")) {
|
||||
return Result.OK(result.get("message"));
|
||||
} else {
|
||||
return Result.error(result.get("message").toString());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -321,14 +324,14 @@ public class InvoicingQldApi {
|
|||
if (StringUtils.isBlank(dto.getQldNo())) {
|
||||
return Result.error("缺少参数");
|
||||
}
|
||||
Map<String, String> result = qinglingApi.cancellation(dto);
|
||||
if ("success".equals(result.get("status"))) {
|
||||
Map<String, Object> result = qinglingApi.cancellation(dto);
|
||||
if ((boolean)result.get("success")) {
|
||||
Map<String, Object> r_ = Maps.newHashMap();
|
||||
r_.put("result", qinglingApi.queryQldByQldNo(dto.getQldNo()));
|
||||
r_.put("message", "作废成功");
|
||||
return Result.OK(r_);
|
||||
} else {
|
||||
return Result.error(result.get("message"));
|
||||
return Result.error(result.get("message").toString());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -363,23 +366,22 @@ public class InvoicingQldApi {
|
|||
@AutoLog(value = "请领单-确认收货", clientType = "app")
|
||||
@PostMapping(value = "/confirmReceipt")
|
||||
public Result<?> confirmReceipt(@RequestBody InvoicingQldMainEntity dto) {
|
||||
//库房是否正在盘点中
|
||||
Map<String, Object> izPd = pddApi.queryPddStartInfo(null);
|
||||
if (izPd.get("success") != null && !(Boolean) izPd.get("success")) {
|
||||
return Result.error((String) izPd.get("message"));
|
||||
}
|
||||
|
||||
if (StringUtils.isBlank(dto.getQldNo()) || StringUtils.isBlank(dto.getNuId()) || StringUtils.isBlank(dto.getElderId())) {
|
||||
return Result.error("缺少参数");
|
||||
}
|
||||
Map<String, String> result = qinglingApi.confirmReceipt(dto);
|
||||
if ("success".equals(result.get("status"))) {
|
||||
//库房是否正在盘点中
|
||||
Map<String, Object> pdResult = pddApi.queryPddStartInfo(null);
|
||||
if (!(boolean) pdResult.get("success")) {
|
||||
return Result.error(pdResult.get("message").toString());
|
||||
}
|
||||
Map<String, Object> result = qinglingApi.confirmReceipt(dto);
|
||||
if ((boolean)result.get("success")) {
|
||||
Map<String, Object> r_ = Maps.newHashMap();
|
||||
r_.put("result", qinglingApi.queryQldByQldNo(dto.getQldNo()));
|
||||
r_.put("message", "收货成功");
|
||||
return Result.OK(r_);
|
||||
} else {
|
||||
return Result.error(result.get("message"));
|
||||
return Result.error(result.get("message").toString());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -396,14 +398,14 @@ public class InvoicingQldApi {
|
|||
if (StringUtils.isBlank(dto.getQldNo())) {
|
||||
return Result.error("缺少参数");
|
||||
}
|
||||
Map<String, String> result = qinglingApi.orderReturn(dto);
|
||||
if ("success".equals(result.get("status"))) {
|
||||
Map<String, Object> result = qinglingApi.orderReturn(dto);
|
||||
if ((boolean)result.get("success")) {
|
||||
Map<String, Object> r_ = Maps.newHashMap();
|
||||
r_.put("result", qinglingApi.queryQldByQldNo(dto.getQldNo()));
|
||||
r_.put("message", "回退成功");
|
||||
return Result.OK(r_);
|
||||
} else {
|
||||
return Result.error(result.get("message"));
|
||||
return Result.error(result.get("message").toString());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -417,12 +419,6 @@ public class InvoicingQldApi {
|
|||
@AutoLog(value = "请领单-出库(单个/批量)", clientType = "app")
|
||||
@PostMapping(value = "/outbound")
|
||||
public Result<Map<String, Object>> outbound(@RequestBody InvoicingQldMainEntity dto) {
|
||||
//判断库房是否正在盘点中
|
||||
Map<String, Object> izPd = pddApi.queryPddStartInfo(null);
|
||||
if (izPd.get("success") != null && !(Boolean) izPd.get("success")) {
|
||||
return Result.error((String) izPd.get("message"));
|
||||
}
|
||||
|
||||
if (StringUtils.isBlank(dto.getQldNo())) {
|
||||
return Result.error("缺少参数");
|
||||
}
|
||||
|
|
@ -430,7 +426,17 @@ public class InvoicingQldApi {
|
|||
if (dto.getQldNo().indexOf(",") > 0) {
|
||||
return Result.error("出库失败");
|
||||
}
|
||||
return Result.ok(qinglingApi.outbound(dto));
|
||||
//判断库房是否正在盘点中
|
||||
Map<String, Object> pdResult = pddApi.queryPddStartInfo(null);
|
||||
if (!(boolean)pdResult.get("success")) {
|
||||
return Result.error(pdResult.get("message").toString());
|
||||
}
|
||||
Map<String, Object> result = qinglingApi.outbound(dto);
|
||||
if ((boolean)result.get("success")) {
|
||||
return Result.ok(result);
|
||||
} else {
|
||||
return Result.error(result.get("message").toString());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -74,11 +74,11 @@ public class InvoicingThdApi {
|
|||
if (StringUtils.isBlank(dto.getId())) {
|
||||
return Result.error("缺少参数");
|
||||
}
|
||||
Map<String, String> result = tuiHuoApi.startDirectiveServe(dto);
|
||||
if ("0".equals(result.get("error_code"))) {
|
||||
return Result.OK(result.get("msg"));
|
||||
Map<String, Object> result = tuiHuoApi.startDirectiveServe(dto);
|
||||
if ((boolean)result.get("success")) {
|
||||
return Result.OK(result.get("message"));
|
||||
} else {
|
||||
return Result.error(result.get("msg"));
|
||||
return Result.error(result.get("message").toString());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -95,11 +95,11 @@ public class InvoicingThdApi {
|
|||
if (StringUtils.isBlank(dto.getId())) {
|
||||
return Result.error("缺少参数");
|
||||
}
|
||||
boolean result = tuiHuoApi.startServe(dto);
|
||||
if (result) {
|
||||
return Result.OK("操作成功");
|
||||
Map<String, Object> result = tuiHuoApi.startServe(dto);
|
||||
if ((boolean)result.get("success")) {
|
||||
return Result.OK(result.get("message"));
|
||||
} else {
|
||||
return Result.error("操作失败");
|
||||
return Result.error(result.get("message").toString());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -120,7 +120,12 @@ public class InvoicingThdApi {
|
|||
if (dto.getThNum() == null || dto.getThNum() == 0) {
|
||||
return Result.error("未填写退货数量");
|
||||
}
|
||||
return Result.ok(tuiHuoApi.addThc(dto));
|
||||
Map<String, Object> result = tuiHuoApi.addThc(dto);
|
||||
if ((boolean)result.get("success")) {
|
||||
return Result.OK(result.get("message"));
|
||||
} else {
|
||||
return Result.error(result.get("message").toString());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -193,18 +198,17 @@ public class InvoicingThdApi {
|
|||
public Result<?> submitThd(@RequestBody InvoicingThdMainEntity dto) {
|
||||
//库房是否正在盘点中
|
||||
Map<String, Object> izPd = pddApi.queryPddStartInfo(null);
|
||||
if (izPd.get("success") != null && !(Boolean) izPd.get("success")) {
|
||||
return Result.error((String) izPd.get("message"));
|
||||
if (!(boolean) izPd.get("success")) {
|
||||
return Result.error(izPd.get("message").toString());
|
||||
}
|
||||
|
||||
if (StringUtils.isBlank(dto.getId())) {
|
||||
return Result.error("缺少参数");
|
||||
}
|
||||
Map<String, String> result = tuiHuoApi.submitThd(dto);
|
||||
if ("success".equals(result.get("status"))) {
|
||||
return Result.OK("入库成功");
|
||||
Map<String, Object> result = tuiHuoApi.submitThd(dto);
|
||||
if ((boolean)result.get("success")) {
|
||||
return Result.OK(result.get("message"));
|
||||
} else {
|
||||
return Result.error(result.get("message"));
|
||||
return Result.error(result.get("message").toString());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -221,11 +225,11 @@ public class InvoicingThdApi {
|
|||
if (StringUtils.isBlank(dto.getId())) {
|
||||
return Result.error("缺少参数");
|
||||
}
|
||||
Map<String, String> result = tuiHuoApi.finishDirectiveServe(dto);
|
||||
if ("0".equals(result.get("error_code"))) {
|
||||
return Result.OK(result.get("msg"));
|
||||
Map<String, Object> result = tuiHuoApi.finishDirectiveServe(dto);
|
||||
if ((boolean)result.get("success")) {
|
||||
return Result.OK(result.get("message"));
|
||||
} else {
|
||||
return Result.error(result.get("msg"));
|
||||
return Result.error(result.get("message").toString());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -242,11 +246,11 @@ public class InvoicingThdApi {
|
|||
if (StringUtils.isBlank(dto.getId())) {
|
||||
return Result.error("缺少参数");
|
||||
}
|
||||
boolean result = tuiHuoApi.finishServe(dto);
|
||||
if (result) {
|
||||
return Result.OK("操作成功");
|
||||
Map<String, Object> result = tuiHuoApi.finishServe(dto);
|
||||
if ((boolean)result.get("success")) {
|
||||
return Result.OK(result.get("message"));
|
||||
} else {
|
||||
return Result.error("操作失败");
|
||||
return Result.error(result.get("message").toString());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -284,11 +288,11 @@ public class InvoicingThdApi {
|
|||
if (StringUtils.isBlank(dto.getNuId()) || StringUtils.isBlank(dto.getElderId())) {
|
||||
return Result.error("缺少参数");
|
||||
}
|
||||
Map<String,String> result = tuiHuoApi.requireTH(dto);
|
||||
if (result.get("error_code").equals("0")) {
|
||||
return Result.OK("操作成功");
|
||||
Map<String, Object> result = tuiHuoApi.requireTH(dto);
|
||||
if ((boolean)result.get("success")) {
|
||||
return Result.OK(result.get("message"));
|
||||
} else {
|
||||
return Result.error(result.get("msg"));
|
||||
return Result.error(result.get("message").toString());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ public interface IPddApi {
|
|||
|
||||
Map<String, Object> queryPddStartInfo(InvoicingPddInfoEntity invoicingPddInfoEntity);
|
||||
|
||||
Map<String, String> startDirectiveServe(InvoicingPddInfoEntity invoicingPddInfoEntity);
|
||||
Map<String, Object> startDirectiveServe(InvoicingPddInfoEntity invoicingPddInfoEntity);
|
||||
|
||||
Map<String, String> finishDirectiveServe(InvoicingPddInfoEntity invoicingPddInfoEntity);
|
||||
Map<String, Object> finishDirectiveServe(InvoicingPddInfoEntity invoicingPddInfoEntity);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -37,11 +37,11 @@ public interface IQinglingApi {
|
|||
|
||||
boolean transRead(InvoicingQldMainEntity dto);
|
||||
|
||||
Map<String, String> cancellation(InvoicingQldMainEntity dto);
|
||||
Map<String, Object> cancellation(InvoicingQldMainEntity dto);
|
||||
|
||||
Map<String, String> confirmReceipt(InvoicingQldMainEntity dto);
|
||||
Map<String, Object> confirmReceipt(InvoicingQldMainEntity dto);
|
||||
|
||||
Map<String, String> orderReturn(InvoicingQldMainEntity dto);
|
||||
Map<String, Object> orderReturn(InvoicingQldMainEntity dto);
|
||||
|
||||
Map<String, Object> outbound(InvoicingQldMainEntity dto);
|
||||
|
||||
|
|
@ -51,7 +51,7 @@ public interface IQinglingApi {
|
|||
|
||||
InvoicingQldMainEntity queryQldByQldNo(String qldNo);
|
||||
|
||||
Map<String, String> startDirectiveServe(InvoicingQldQueryEntity dto);
|
||||
Map<String, Object> startDirectiveServe(InvoicingQldQueryEntity dto);
|
||||
|
||||
Map<String, String> finishDirectiveServe(InvoicingQldQueryEntity dto);
|
||||
Map<String, Object> finishDirectiveServe(InvoicingQldQueryEntity dto);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -16,9 +16,9 @@ public interface ITuiHuoApi {
|
|||
|
||||
List<NuKcslEntity> thdNuMaterialList(InvoicingThdMainEntity dto);
|
||||
|
||||
Map<String, String> startDirectiveServe(InvoicingThdMainEntity dto);
|
||||
Map<String, Object> startDirectiveServe(InvoicingThdMainEntity dto);
|
||||
|
||||
boolean startServe(InvoicingThdMainEntity dto);
|
||||
Map<String, Object> startServe(InvoicingThdMainEntity dto);
|
||||
|
||||
Map<String,Object> addThc(InvoicingThdGwcEntity dto);
|
||||
|
||||
|
|
@ -28,15 +28,15 @@ public interface ITuiHuoApi {
|
|||
|
||||
boolean removeAll(InvoicingThdGwcEntity dto);
|
||||
|
||||
Map<String,String> submitThd(InvoicingThdMainEntity dto);
|
||||
Map<String,Object> submitThd(InvoicingThdMainEntity dto);
|
||||
|
||||
Map<String, String> finishDirectiveServe(InvoicingThdMainEntity dto);
|
||||
Map<String, Object> finishDirectiveServe(InvoicingThdMainEntity dto);
|
||||
|
||||
boolean finishServe(InvoicingThdMainEntity dto);
|
||||
Map<String, Object> finishServe(InvoicingThdMainEntity dto);
|
||||
|
||||
boolean transRead(InvoicingThdMainEntity dto);
|
||||
|
||||
Map<String,String> requireTH(InvoicingThdMainEntity dto);
|
||||
Map<String,Object> requireTH(InvoicingThdMainEntity dto);
|
||||
|
||||
List<NuKcslEntity> thdMaterialList(InvoicingThdMainEntity dto);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -65,8 +65,8 @@ public class NuInvoicingPddMainServiceImpl extends ServiceImpl<NuInvoicingPddMai
|
|||
private DictUtils dictUtils;
|
||||
@Autowired
|
||||
private IInvoicingOrdersApi invoicingOrdersApi;
|
||||
@Autowired
|
||||
private IInvoicingPdOrdersApi invoicingPdOrdersApi;
|
||||
// @Autowired
|
||||
// private IInvoicingPdOrdersApi invoicingPdOrdersApi;
|
||||
|
||||
@Override
|
||||
public IPage<InvoicingPddMainEntity> queryPddList(Integer pageNo, Integer pageSize, InvoicingPddMainEntity invoicingPddMainEntity, HttpServletRequest req) {
|
||||
|
|
@ -102,7 +102,7 @@ public class NuInvoicingPddMainServiceImpl extends ServiceImpl<NuInvoicingPddMai
|
|||
|
||||
List<NuInvoicingPddMain> list = baseMapper.selectList(new QueryWrapper<NuInvoicingPddMain>().eq("nu_id",invoicingPddMainEntity.getNuId()).eq("pdd_type","1"));
|
||||
if(list.size() > 0){
|
||||
map.put("success","false");
|
||||
map.put("success",false);
|
||||
map.put("message","盘点单已存在,不可重复创建");
|
||||
return map;
|
||||
}
|
||||
|
|
@ -138,7 +138,7 @@ public class NuInvoicingPddMainServiceImpl extends ServiceImpl<NuInvoicingPddMai
|
|||
|
||||
redisUtil.set("pdd"+qgdDate,qgdXlhInt);
|
||||
invoicingPddMainEntity.setPddType_dictText("盘点中");
|
||||
map.put("success","true");
|
||||
map.put("success",true);
|
||||
map.put("message",invoicingPddMainEntity);
|
||||
return map;
|
||||
}
|
||||
|
|
@ -198,7 +198,7 @@ public class NuInvoicingPddMainServiceImpl extends ServiceImpl<NuInvoicingPddMai
|
|||
nuInvoicingPddMain.setPydNum(pydNum);
|
||||
nuInvoicingPddMain.setPkdNum(pkdNum);
|
||||
baseMapper.updateById(nuInvoicingPddMain);
|
||||
map.put("success","true");
|
||||
map.put("success",true);
|
||||
map.put("message",nuInvoicingPddInfo);
|
||||
return map;
|
||||
}
|
||||
|
|
@ -215,7 +215,7 @@ public class NuInvoicingPddMainServiceImpl extends ServiceImpl<NuInvoicingPddMai
|
|||
}
|
||||
NuInvoicingPddMain nuInvoicingPddMainInfo =baseMapper.selectById(invoicingPddMainEntity.getId());
|
||||
if(!StringUtils.equals("1",nuInvoicingPddMainInfo.getPddType())){
|
||||
map.put("success","false");
|
||||
map.put("success",false);
|
||||
map.put("message","盘点单状态不是盘点中,不能提交盘点单");
|
||||
return map;
|
||||
}
|
||||
|
|
@ -229,7 +229,7 @@ public class NuInvoicingPddMainServiceImpl extends ServiceImpl<NuInvoicingPddMai
|
|||
}
|
||||
}
|
||||
if(sfwc == 1){
|
||||
map.put("success","false");
|
||||
map.put("success",false);
|
||||
map.put("message","有未完成的盘点信息,不能提交盘点单");
|
||||
return map;
|
||||
}
|
||||
|
|
@ -292,7 +292,7 @@ public class NuInvoicingPddMainServiceImpl extends ServiceImpl<NuInvoicingPddMai
|
|||
}
|
||||
}
|
||||
|
||||
map.put("success","true");
|
||||
map.put("success",true);
|
||||
map.put("message","操作成功");
|
||||
return map;
|
||||
}
|
||||
|
|
@ -320,7 +320,7 @@ public class NuInvoicingPddMainServiceImpl extends ServiceImpl<NuInvoicingPddMai
|
|||
}
|
||||
NuInvoicingPddMain nuInvoicingPddMainInfo =baseMapper.selectById(invoicingPddMainEntity.getId());
|
||||
if(!StringUtils.equals("1",nuInvoicingPddMainInfo.getPddType())){
|
||||
map.put("success","false");
|
||||
map.put("success",false);
|
||||
map.put("message","盘点单状态不是盘点中,不能作废盘点单");
|
||||
return map;
|
||||
}
|
||||
|
|
@ -334,7 +334,7 @@ public class NuInvoicingPddMainServiceImpl extends ServiceImpl<NuInvoicingPddMai
|
|||
nuInvoicingPddMainInfo.setPddStatus("3");
|
||||
nuInvoicingPddMainInfo.setPddType("3");
|
||||
baseMapper.updateById(nuInvoicingPddMainInfo);
|
||||
map.put("success","true");
|
||||
map.put("success",true);
|
||||
map.put("message","操作成功");
|
||||
return map;
|
||||
}
|
||||
|
|
@ -349,7 +349,7 @@ public class NuInvoicingPddMainServiceImpl extends ServiceImpl<NuInvoicingPddMai
|
|||
return map;
|
||||
}
|
||||
map.put("success",true);
|
||||
map.put("message","操作成功");
|
||||
map.put("message","入库成功");
|
||||
return map;
|
||||
}
|
||||
|
||||
|
|
@ -360,12 +360,12 @@ public class NuInvoicingPddMainServiceImpl extends ServiceImpl<NuInvoicingPddMai
|
|||
*/
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Map<String, String> startDirectiveServe(InvoicingPddInfoEntity dto) {
|
||||
public Map<String, Object> startDirectiveServe(InvoicingPddInfoEntity dto) {
|
||||
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
InvoicingOrdersEntity orderEntity = new InvoicingOrdersEntity();
|
||||
orderEntity.setId(dto.getId());//指令id
|
||||
orderEntity.setInitiatorId(sysUser.getEmployessId());//员工id
|
||||
Map<String, String> result = invoicingOrdersApi.beginOrder(orderEntity);
|
||||
Map<String, Object> result = invoicingOrdersApi.beginOrder(orderEntity);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
@ -376,7 +376,7 @@ public class NuInvoicingPddMainServiceImpl extends ServiceImpl<NuInvoicingPddMai
|
|||
*/
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Map<String, String> finishDirectiveServe(InvoicingPddInfoEntity dto){
|
||||
public Map<String, Object> finishDirectiveServe(InvoicingPddInfoEntity dto){
|
||||
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
InvoicingOrdersEntity p_ = new InvoicingOrdersEntity();
|
||||
p_.setId(dto.getId());
|
||||
|
|
|
|||
|
|
@ -106,8 +106,8 @@ public class QingLingServiceImpl implements IQinglingApi {
|
|||
private QingLingServiceImpl ownService;
|
||||
@Autowired
|
||||
private IInvoicingOrdersApi invoicingOrdersApi;
|
||||
@Autowired
|
||||
private IInvoicingQlOrdersApi invoicingQlOrdersApi;
|
||||
// @Autowired
|
||||
// private IInvoicingQlOrdersApi invoicingQlOrdersApi;
|
||||
|
||||
@Override
|
||||
public List<Map<String, Object>> getMaterialTreeData(MaterialCategoryEntity materialCategoryEntity) {
|
||||
|
|
@ -287,8 +287,8 @@ public class QingLingServiceImpl implements IQinglingApi {
|
|||
|
||||
//检测是否可以正常提交
|
||||
if (!invoicingQldLogService.opeNodeJudgeCanStatus(dto.getQldNo(), "3")) {
|
||||
result.put("status", "faild");
|
||||
result.put("message", "提交失败,请重新提交");
|
||||
result.put("success", false);
|
||||
result.put("message", "提交失败");
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
@ -297,8 +297,8 @@ public class QingLingServiceImpl implements IQinglingApi {
|
|||
infoQW.eq("qld_no", dto.getQldNo());
|
||||
List<NuInvoicingQldInfo> infoList = invoicingQldInfoMapper.selectList(infoQW);
|
||||
if (CollectionUtils.isEmpty(infoList)) {
|
||||
result.put("status", "faild");
|
||||
result.put("message", "不存在物料,无法提交");
|
||||
result.put("success", false);
|
||||
result.put("message", "物料不存在");
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
@ -330,7 +330,7 @@ public class QingLingServiceImpl implements IQinglingApi {
|
|||
one.setTjTime(new Date());//作废时间
|
||||
invoicingQldMainService.updateById(one);
|
||||
|
||||
result.put("status", "success");
|
||||
result.put("success", true);
|
||||
result.put("message", "提交成功");
|
||||
result.put("result", ownService.queryQldByQldNo(dto.getQldNo()));
|
||||
return result;
|
||||
|
|
@ -371,7 +371,7 @@ public class QingLingServiceImpl implements IQinglingApi {
|
|||
|
||||
//请购车未添加物料
|
||||
if (CollectionUtils.isEmpty(gwcList)) {
|
||||
result.put("status", "empty");
|
||||
result.put("success", false);
|
||||
result.put("message", "请选择请领物料");
|
||||
return result;
|
||||
}
|
||||
|
|
@ -393,14 +393,15 @@ public class QingLingServiceImpl implements IQinglingApi {
|
|||
.collect(Collectors.toList());
|
||||
|
||||
if (!CollectionUtils.isEmpty(disabledWlList)) {
|
||||
result.put("status", "exist");
|
||||
result.put("existList", disabledWlList);
|
||||
// result.put("status", "exist");
|
||||
// result.put("existList", disabledWlList);
|
||||
|
||||
// 将materialName用顿号拼接
|
||||
String materialNames = disabledWlList.stream()
|
||||
.map(InvoicingQldInfoEntity::getMaterialName)
|
||||
.collect(Collectors.joining("、"));
|
||||
result.put("message", "以下物料请领中,请勿重复请领:" + materialNames);
|
||||
result.put("success", false);
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
|
@ -502,7 +503,7 @@ public class QingLingServiceImpl implements IQinglingApi {
|
|||
logData.setElderId(dto.getElderId());//长者id
|
||||
invoicingQldLogMapper.insert(logData);
|
||||
|
||||
result.put("status", "success");
|
||||
result.put("success", true);
|
||||
result.put("message", "提交成功");
|
||||
|
||||
// InvoicingOrdersEntity orderEntity = new InvoicingOrdersEntity();
|
||||
|
|
@ -616,12 +617,12 @@ public class QingLingServiceImpl implements IQinglingApi {
|
|||
*/
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Map<String, String> cancellation(InvoicingQldMainEntity dto) {
|
||||
Map<String, String> result = Maps.newHashMap();
|
||||
public Map<String, Object> cancellation(InvoicingQldMainEntity dto) {
|
||||
Map<String, Object> result = Maps.newHashMap();
|
||||
//检测是否可以正常作废
|
||||
if (!invoicingQldLogService.opeNodeJudgeCanStatus(dto.getQldNo(), "1,3")) {
|
||||
result.put("status", "faild");
|
||||
result.put("message", "请先开始指令");
|
||||
result.put("success", false);
|
||||
result.put("message", "作废失败");
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
@ -691,7 +692,7 @@ public class QingLingServiceImpl implements IQinglingApi {
|
|||
// invoicingQlOrdersApi.flowQlzf(orderEntity);
|
||||
// }
|
||||
invoicingQldMainService.updateById(one);
|
||||
result.put("status", "success");
|
||||
result.put("success", true);
|
||||
result.put("message", "作废成功");
|
||||
return result;
|
||||
}
|
||||
|
|
@ -729,8 +730,8 @@ public class QingLingServiceImpl implements IQinglingApi {
|
|||
*/
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Map<String, String> confirmReceipt(InvoicingQldMainEntity dto) {
|
||||
Map<String, String> result = Maps.newHashMap();
|
||||
public Map<String, Object> confirmReceipt(InvoicingQldMainEntity dto) {
|
||||
Map<String, Object> result = Maps.newHashMap();
|
||||
|
||||
//检测是否已经开始服务
|
||||
// {
|
||||
|
|
@ -747,7 +748,7 @@ public class QingLingServiceImpl implements IQinglingApi {
|
|||
|
||||
//检测是否可以正常收货
|
||||
if (!invoicingQldLogService.opeNodeJudgeCanStatus(dto.getQldNo(), "4")) {
|
||||
result.put("status", "faild");
|
||||
result.put("success", false);
|
||||
result.put("message", "收货失败");
|
||||
return result;
|
||||
}
|
||||
|
|
@ -914,7 +915,7 @@ public class QingLingServiceImpl implements IQinglingApi {
|
|||
}
|
||||
});
|
||||
warehouseMaterialInfoService.updateBatchById(kfUpdateList);
|
||||
result.put("status", "success");
|
||||
result.put("success", true);
|
||||
result.put("message", "收货完成");
|
||||
return result;
|
||||
}
|
||||
|
|
@ -927,8 +928,8 @@ public class QingLingServiceImpl implements IQinglingApi {
|
|||
*/
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Map<String, String> orderReturn(InvoicingQldMainEntity dto) {
|
||||
Map<String, String> result = Maps.newHashMap();
|
||||
public Map<String, Object> orderReturn(InvoicingQldMainEntity dto) {
|
||||
Map<String, Object> result = Maps.newHashMap();
|
||||
//检测是否已经开始服务
|
||||
// {
|
||||
// InvoicingOrdersEntity p_ = new InvoicingOrdersEntity();
|
||||
|
|
@ -944,7 +945,7 @@ public class QingLingServiceImpl implements IQinglingApi {
|
|||
|
||||
//检测是否可以正常回退
|
||||
if (!invoicingQldLogService.opeNodeJudgeCanStatus(dto.getQldNo(), "1,4")) {
|
||||
result.put("status", "faild");
|
||||
result.put("success", false);
|
||||
result.put("message", "回退失败");
|
||||
return result;
|
||||
}
|
||||
|
|
@ -974,7 +975,7 @@ public class QingLingServiceImpl implements IQinglingApi {
|
|||
one.setHtTime(new Date());//回退时间
|
||||
boolean r_ = invoicingQldMainService.updateById(one);
|
||||
|
||||
result.put("status", "success");
|
||||
result.put("success", true);
|
||||
result.put("message", "回退成功");
|
||||
return result;
|
||||
}
|
||||
|
|
@ -1005,7 +1006,7 @@ public class QingLingServiceImpl implements IQinglingApi {
|
|||
|
||||
//检测单子状态是否正确
|
||||
if (!invoicingQldLogService.opeNodeJudgeCanStatus(dto.getQldNo(), "1")) {
|
||||
map.put("status", "faild");
|
||||
map.put("success", false);
|
||||
map.put("message", "出库失败");
|
||||
return map;
|
||||
}
|
||||
|
|
@ -1031,7 +1032,7 @@ public class QingLingServiceImpl implements IQinglingApi {
|
|||
}
|
||||
}
|
||||
if (!errorWl.isEmpty()) {
|
||||
map.put("status", "faild");
|
||||
map.put("success", false);
|
||||
map.put("message", "以下物料库存不足,无法出库:" + errorWl);
|
||||
return map;
|
||||
}
|
||||
|
|
@ -1060,7 +1061,7 @@ public class QingLingServiceImpl implements IQinglingApi {
|
|||
qldData.setCkBy(sysUser.getId());//出库人
|
||||
qldData.setCkTime(new Date());//出库时间
|
||||
invoicingQldMainService.update(qldData, qw);
|
||||
map.put("status", "success");
|
||||
map.put("success", true);
|
||||
map.put("message", "出库成功");
|
||||
return map;
|
||||
}
|
||||
|
|
@ -1227,7 +1228,7 @@ public class QingLingServiceImpl implements IQinglingApi {
|
|||
* @return
|
||||
*/
|
||||
@Override
|
||||
public Map<String, String> startDirectiveServe(InvoicingQldQueryEntity dto) {
|
||||
public Map<String, Object> startDirectiveServe(InvoicingQldQueryEntity dto) {
|
||||
//delete by caolei 2025-12-25
|
||||
// Map<String, String> result = Maps.newHashMap();
|
||||
//检测上一操作节点是否已完成(指动作完成,非点击了结束服务)
|
||||
|
|
@ -1299,7 +1300,7 @@ public class QingLingServiceImpl implements IQinglingApi {
|
|||
*/
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Map<String, String> finishDirectiveServe(InvoicingQldQueryEntity dto) {
|
||||
public Map<String, Object> finishDirectiveServe(InvoicingQldQueryEntity dto) {
|
||||
// Map<String,String> map = new HashMap();
|
||||
// map.put("error_code","0");
|
||||
// map.put("msg","可以提交");
|
||||
|
|
@ -1354,72 +1355,72 @@ public class QingLingServiceImpl implements IQinglingApi {
|
|||
return invoicingOrdersApi.finishOrder(p_);
|
||||
}
|
||||
|
||||
/**
|
||||
* 判断是否可结束工单
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
private Map<String, String> izCanFinish(String flowCode, String status) {
|
||||
Map<String, String> map = new HashMap();
|
||||
map.put("error_code", "0");
|
||||
map.put("msg", "可以结束");
|
||||
//完成结束判断算法:
|
||||
//一、申请可完成 flowCode=ql_sq,完成时只有2种判断,1、业务单号qldNo不为空 ;2、已提交status=1
|
||||
//二、出库可完成 flowCode=ql_ck,完成时只有2种判断,1、已出库status=4 ;2、已回退status=3
|
||||
//三、收货可完成 flowCode=ql_sh,完成时只有1种判断,1、已收货status=5
|
||||
//不考虑作废情况,作废时会将ql_sq的工单状态恢复成最原始状态,判断算法使用根据一、申请可完成
|
||||
//一、申请可完成判断
|
||||
if (flowCode.equals("ql_sq")) {
|
||||
if (!status.equals("1")) {
|
||||
map.put("error_code", "1");
|
||||
map.put("msg", "请先提交请领单");
|
||||
}
|
||||
}
|
||||
//二、出库可完成判断
|
||||
if (flowCode.equals("ql_ck")) {
|
||||
if (status.equals("3") || status.equals("4")) {
|
||||
} else {
|
||||
map.put("error_code", "1");
|
||||
map.put("msg", "请先出库或回退");
|
||||
}
|
||||
}
|
||||
//三、收货可完成判断
|
||||
if (flowCode.equals("ql_sh")) {
|
||||
if (!status.equals("5")) {
|
||||
map.put("error_code", "1");
|
||||
map.put("msg", "请先收货");
|
||||
}
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
/**
|
||||
* 生成下一服务指令工单
|
||||
*/
|
||||
private void createNextOrder(InvoicingOrdersEntity entity, NuInvoicingQldMain main) {
|
||||
String flowCode = entity.getFlowCode();
|
||||
String status = main.getStatus();
|
||||
InvoicingOrdersEntity orderEntity = new InvoicingOrdersEntity();
|
||||
orderEntity.setFlowCode(flowCode);//ql_sq
|
||||
orderEntity.setBizId(main.getQldNo());//请领单号
|
||||
orderEntity.setNuId(main.getNuId());//护理单元id
|
||||
orderEntity.setElderId(main.getElderId());//长者id
|
||||
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
orderEntity.setInitiatorId(sysUser.getEmployessId());//提交人id
|
||||
//生成请领下一步服务指令
|
||||
if (flowCode.equals("ql_sq")) {
|
||||
invoicingQlOrdersApi.flowQlsq(orderEntity);
|
||||
}
|
||||
if (flowCode.equals("ql_ck")) {
|
||||
//生成出库下一步服务指令
|
||||
if (status.equals("4")) {
|
||||
invoicingQlOrdersApi.flowQlck(orderEntity);
|
||||
}
|
||||
//生成回退下一步服务指令
|
||||
if (status.equals("3")) {
|
||||
invoicingQlOrdersApi.flowQlht(orderEntity);
|
||||
}
|
||||
}
|
||||
}
|
||||
// /**
|
||||
// * 判断是否可结束工单
|
||||
// *
|
||||
// * @return
|
||||
// */
|
||||
// private Map<String, String> izCanFinish(String flowCode, String status) {
|
||||
// Map<String, String> map = new HashMap();
|
||||
// map.put("error_code", "0");
|
||||
// map.put("msg", "可以结束");
|
||||
// //完成结束判断算法:
|
||||
// //一、申请可完成 flowCode=ql_sq,完成时只有2种判断,1、业务单号qldNo不为空 ;2、已提交status=1
|
||||
// //二、出库可完成 flowCode=ql_ck,完成时只有2种判断,1、已出库status=4 ;2、已回退status=3
|
||||
// //三、收货可完成 flowCode=ql_sh,完成时只有1种判断,1、已收货status=5
|
||||
// //不考虑作废情况,作废时会将ql_sq的工单状态恢复成最原始状态,判断算法使用根据一、申请可完成
|
||||
// //一、申请可完成判断
|
||||
// if (flowCode.equals("ql_sq")) {
|
||||
// if (!status.equals("1")) {
|
||||
// map.put("error_code", "1");
|
||||
// map.put("msg", "请先提交请领单");
|
||||
// }
|
||||
// }
|
||||
// //二、出库可完成判断
|
||||
// if (flowCode.equals("ql_ck")) {
|
||||
// if (status.equals("3") || status.equals("4")) {
|
||||
// } else {
|
||||
// map.put("error_code", "1");
|
||||
// map.put("msg", "请先出库或回退");
|
||||
// }
|
||||
// }
|
||||
// //三、收货可完成判断
|
||||
// if (flowCode.equals("ql_sh")) {
|
||||
// if (!status.equals("5")) {
|
||||
// map.put("error_code", "1");
|
||||
// map.put("msg", "请先收货");
|
||||
// }
|
||||
// }
|
||||
// return map;
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 生成下一服务指令工单
|
||||
// */
|
||||
// private void createNextOrder(InvoicingOrdersEntity entity, NuInvoicingQldMain main) {
|
||||
// String flowCode = entity.getFlowCode();
|
||||
// String status = main.getStatus();
|
||||
// InvoicingOrdersEntity orderEntity = new InvoicingOrdersEntity();
|
||||
// orderEntity.setFlowCode(flowCode);//ql_sq
|
||||
// orderEntity.setBizId(main.getQldNo());//请领单号
|
||||
// orderEntity.setNuId(main.getNuId());//护理单元id
|
||||
// orderEntity.setElderId(main.getElderId());//长者id
|
||||
// LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
// orderEntity.setInitiatorId(sysUser.getEmployessId());//提交人id
|
||||
// //生成请领下一步服务指令
|
||||
// if (flowCode.equals("ql_sq")) {
|
||||
// invoicingQlOrdersApi.flowQlsq(orderEntity);
|
||||
// }
|
||||
// if (flowCode.equals("ql_ck")) {
|
||||
// //生成出库下一步服务指令
|
||||
// if (status.equals("4")) {
|
||||
// invoicingQlOrdersApi.flowQlck(orderEntity);
|
||||
// }
|
||||
// //生成回退下一步服务指令
|
||||
// if (status.equals("3")) {
|
||||
// invoicingQlOrdersApi.flowQlht(orderEntity);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
}
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -81,8 +81,8 @@ public class ThdServiceImpl implements ITuiHuoApi {
|
|||
private ConfigMaterialInfoMapper configMaterialInfoMapper;
|
||||
@Autowired
|
||||
private IInvoicingOrdersApi invoicingOrdersApi;
|
||||
@Autowired
|
||||
private IInvoicingThOrdersApi invoicingThOrdersApi;
|
||||
// @Autowired
|
||||
// private IInvoicingThOrdersApi invoicingThOrdersApi;
|
||||
|
||||
@Override
|
||||
public IPage<InvoicingThdMainEntity> thdList(Integer pageNo, Integer pageSize, InvoicingThdMainEntity dto) {
|
||||
|
|
@ -138,13 +138,13 @@ public class ThdServiceImpl implements ITuiHuoApi {
|
|||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Map<String, String> startDirectiveServe(InvoicingThdMainEntity dto) {
|
||||
public Map<String, Object> startDirectiveServe(InvoicingThdMainEntity dto) {
|
||||
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
InvoicingOrdersEntity orderEntity = new InvoicingOrdersEntity();
|
||||
// orderEntity.setFlowCode("dyth_cksh");//指令流程flow_code 看接口有标明
|
||||
orderEntity.setId(dto.getId());//退货指令id
|
||||
orderEntity.setInitiatorId(sysUser.getEmployessId());//员工id
|
||||
Map<String, String> result = invoicingOrdersApi.beginOrder(orderEntity);
|
||||
Map<String, Object> result = invoicingOrdersApi.beginOrder(orderEntity);
|
||||
//delete by caolei 2025-12-25
|
||||
// if ("0".equals(result.get("error_code"))) {
|
||||
// InvoicingOrdersEntity p_ = new InvoicingOrdersEntity();
|
||||
|
|
@ -165,14 +165,18 @@ public class ThdServiceImpl implements ITuiHuoApi {
|
|||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public boolean startServe(InvoicingThdMainEntity dto) {
|
||||
public Map<String, Object> startServe(InvoicingThdMainEntity dto) {
|
||||
Map<String, Object> map = new HashMap();
|
||||
map.put("success", true);
|
||||
map.put("message", "操作成功");
|
||||
//查询当前状态
|
||||
QueryWrapper<NuInvoicingThdMain> qw = new QueryWrapper<>();
|
||||
qw.eq("id", dto.getId());
|
||||
NuInvoicingThdMain main = thdMainMapper.selectOne(qw);
|
||||
|
||||
if (main == null || !"0".equals(main.getStatus())) {
|
||||
return false;
|
||||
map.put("success", false);
|
||||
map.put("message", "操作失败");
|
||||
} else {
|
||||
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
String status = "1";
|
||||
|
|
@ -192,15 +196,15 @@ public class ThdServiceImpl implements ITuiHuoApi {
|
|||
logData.setNuId(main.getNuId());//护理单元id
|
||||
logData.setElderId(main.getElderId());//长者id
|
||||
thdLogMapper.insert(logData);
|
||||
|
||||
return true;
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Object> addThc(InvoicingThdGwcEntity dto) {
|
||||
Map<String, Object> result = Maps.newHashMap();
|
||||
|
||||
result.put("success", true);
|
||||
result.put("message", "添加成功");
|
||||
//检测退货数量是否小于等于护理单元库存数量 无需检查
|
||||
// QueryWrapper<NuInvoicingNuKcsl> kcslQW = new QueryWrapper<>();
|
||||
// kcslQW.eq("nu_id", dto.getNuId());
|
||||
|
|
@ -221,8 +225,8 @@ public class ThdServiceImpl implements ITuiHuoApi {
|
|||
List<NuInvoicingThdGwc> thcList = thdGwcMapper.selectList(thcQW);
|
||||
if (!CollectionUtils.isEmpty(thcList)) {
|
||||
//已存在该物料
|
||||
result.put("status", "existed");
|
||||
result.put("message", "已添加该物料,请勿重复添加");
|
||||
result.put("success", false);
|
||||
result.put("message", "已添加该物料");
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
@ -235,8 +239,6 @@ public class ThdServiceImpl implements ITuiHuoApi {
|
|||
thc.setWlId(dto.getWlId());//物料id
|
||||
thc.setThNum(dto.getThNum());//退货数量
|
||||
thdGwcMapper.insert(thc);//新增
|
||||
|
||||
result.put("status", "success");
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
@ -271,17 +273,19 @@ public class ThdServiceImpl implements ITuiHuoApi {
|
|||
*/
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Map<String, String> submitThd(InvoicingThdMainEntity dto) {
|
||||
Map<String, String> result = Maps.newHashMap();
|
||||
//指令工单处判断是否允许提交
|
||||
InvoicingOrdersEntity p_ = new InvoicingOrdersEntity();
|
||||
p_.setPoolId(dto.getId());
|
||||
Map<String,String> j = invoicingThOrdersApi.izCanSubmit(p_);
|
||||
if(!j.get("error_code").equals("0")){
|
||||
result.put("status", "nodeError");
|
||||
result.put("message", j.get("msg"));
|
||||
return result;
|
||||
}
|
||||
public Map<String, Object> submitThd(InvoicingThdMainEntity dto) {
|
||||
Map<String, Object> result = Maps.newHashMap();
|
||||
result.put("success", true);
|
||||
result.put("message", "入库成功");
|
||||
// //指令工单处判断是否允许提交
|
||||
// InvoicingOrdersEntity p_ = new InvoicingOrdersEntity();
|
||||
// p_.setPoolId(dto.getId());
|
||||
// Map<String,String> j = invoicingThOrdersApi.izCanSubmit(p_);
|
||||
// if(!j.get("error_code").equals("0")){
|
||||
// result.put("status", "nodeError");
|
||||
// result.put("message", j.get("msg"));
|
||||
// return result;
|
||||
// }
|
||||
|
||||
//查询主表信息
|
||||
QueryWrapper<NuInvoicingThdMain> qw = new QueryWrapper<>();
|
||||
|
|
@ -297,7 +301,7 @@ public class ThdServiceImpl implements ITuiHuoApi {
|
|||
{
|
||||
//检测单子状态是否正确
|
||||
if (main == null || !"0".equals(main.getStatus())) {
|
||||
result.put("status", "nodeError");
|
||||
result.put("success", false);
|
||||
result.put("message", "入库失败");
|
||||
return result;
|
||||
}
|
||||
|
|
@ -311,7 +315,7 @@ public class ThdServiceImpl implements ITuiHuoApi {
|
|||
// }
|
||||
//未添加退货物料检测
|
||||
if (CollectionUtils.isEmpty(gwcList)) {
|
||||
result.put("status", "faild");
|
||||
result.put("success", false);
|
||||
result.put("message", "未添加物料");
|
||||
return result;
|
||||
}
|
||||
|
|
@ -539,44 +543,43 @@ public class ThdServiceImpl implements ITuiHuoApi {
|
|||
}
|
||||
}
|
||||
|
||||
InvoicingOrdersEntity orderEntity = new InvoicingOrdersEntity();
|
||||
orderEntity.setPoolId(dto.getId());//退货主表id 入库时会根据更新为对应退货单号(入库时才生成的退货单号)
|
||||
orderEntity.setBizId(main.getThdNo());
|
||||
orderEntity.setInitiatorId(sysUser.getEmployessId());//员工id
|
||||
// InvoicingOrdersEntity orderEntity = new InvoicingOrdersEntity();
|
||||
// orderEntity.setPoolId(dto.getId());//退货主表id 入库时会根据更新为对应退货单号(入库时才生成的退货单号)
|
||||
// orderEntity.setBizId(main.getThdNo());
|
||||
// orderEntity.setInitiatorId(sysUser.getEmployessId());//员工id
|
||||
//delete by caolei 2025-12-25
|
||||
// orderEntity.setNuId(main.getNuId());//护理单元id
|
||||
// orderEntity.setElderId(main.getElderId());//长者id
|
||||
// orderEntity.setFlowCode("dyth_cksh");//指令流程flow_code 看接口有标明
|
||||
invoicingThOrdersApi.updateOrderBizId(orderEntity);
|
||||
// invoicingThOrdersApi.updateOrderBizId(orderEntity);
|
||||
|
||||
result.put("status", "success");
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Map<String, String> finishDirectiveServe(InvoicingThdMainEntity dto) {
|
||||
Map<String, String> r_ = Maps.newHashMap();
|
||||
InvoicingOrdersEntity p_ = new InvoicingOrdersEntity();
|
||||
p_.setId(dto.getId());
|
||||
InvoicingOrdersEntity v_ = invoicingThOrdersApi.getOrderInfo(p_);
|
||||
if (v_ == null || StringUtils.isBlank(v_.getPoolId())) {
|
||||
r_.put("error_code", "1");
|
||||
r_.put("msg", "工单不存在");
|
||||
return r_;
|
||||
}
|
||||
String mainId = v_.getPoolId();//退货单id
|
||||
//查询当前状态
|
||||
QueryWrapper<NuInvoicingThdMain> qw = new QueryWrapper<>();
|
||||
qw.eq("id", mainId);
|
||||
NuInvoicingThdMain main = thdMainMapper.selectOne(qw);
|
||||
|
||||
//检测是否已入库
|
||||
if (main == null || !"1".equals(main.getStatus())) {
|
||||
r_.put("error_code", "1");
|
||||
r_.put("msg", "退货单未入库");
|
||||
return r_;
|
||||
}
|
||||
public Map<String, Object> finishDirectiveServe(InvoicingThdMainEntity dto) {
|
||||
// Map<String, Object> r_ = Maps.newHashMap();
|
||||
// InvoicingOrdersEntity p_ = new InvoicingOrdersEntity();
|
||||
// p_.setId(dto.getId());
|
||||
// InvoicingOrdersEntity v_ = invoicingThOrdersApi.getOrderInfo(p_);
|
||||
// if (v_ == null || StringUtils.isBlank(v_.getPoolId())) {
|
||||
// r_.put("success", false);
|
||||
// r_.put("message", "工单不存在");
|
||||
// return r_;
|
||||
// }
|
||||
// String mainId = v_.getPoolId();//退货单id
|
||||
// //查询当前状态
|
||||
// QueryWrapper<NuInvoicingThdMain> qw = new QueryWrapper<>();
|
||||
// qw.eq("id", mainId);
|
||||
// NuInvoicingThdMain main = thdMainMapper.selectOne(qw);
|
||||
//
|
||||
// //检测是否已入库
|
||||
// if (main == null || !"1".equals(main.getStatus())) {
|
||||
// r_.put("success", false);
|
||||
// r_.put("message", "退货单未入库");
|
||||
// return r_;
|
||||
// }
|
||||
|
||||
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
InvoicingOrdersEntity orderEntity = new InvoicingOrdersEntity();
|
||||
|
|
@ -584,7 +587,7 @@ public class ThdServiceImpl implements ITuiHuoApi {
|
|||
orderEntity.setId(dto.getId());//退货指令的id
|
||||
// orderEntity.setBizId(main.getThdNo());
|
||||
orderEntity.setInitiatorId(sysUser.getEmployessId());//员工id
|
||||
Map<String, String> result = invoicingOrdersApi.finishOrder(orderEntity);
|
||||
Map<String, Object> result = invoicingOrdersApi.finishOrder(orderEntity);
|
||||
// if ("0".equals(result.get("error_code"))) {
|
||||
// //将状态改为已开始
|
||||
// UpdateWrapper<NuInvoicingThdMain> thUW = new UpdateWrapper<>();
|
||||
|
|
@ -599,14 +602,18 @@ public class ThdServiceImpl implements ITuiHuoApi {
|
|||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public boolean finishServe(InvoicingThdMainEntity dto) {
|
||||
public Map<String, Object> finishServe(InvoicingThdMainEntity dto) {
|
||||
Map<String, Object> map = new HashMap();
|
||||
map.put("success", true);
|
||||
map.put("message", "操作成功");
|
||||
//查询当前状态
|
||||
QueryWrapper<NuInvoicingThdMain> qw = new QueryWrapper<>();
|
||||
qw.eq("id", dto.getId());
|
||||
NuInvoicingThdMain main = thdMainMapper.selectOne(qw);
|
||||
|
||||
if (main == null || !"2".equals(main.getStatus())) {
|
||||
return false;
|
||||
map.put("success", false);
|
||||
map.put("message", "操作失败");
|
||||
} else {
|
||||
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
String status = "3";//已结束服务
|
||||
|
|
@ -627,9 +634,8 @@ public class ThdServiceImpl implements ITuiHuoApi {
|
|||
logData.setNuId(main.getNuId());//护理单元id
|
||||
logData.setElderId(main.getElderId());//长者id
|
||||
thdLogMapper.insert(logData);
|
||||
|
||||
return true;
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
@ -642,10 +648,10 @@ public class ThdServiceImpl implements ITuiHuoApi {
|
|||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Map<String,String> requireTH(InvoicingThdMainEntity dto) {
|
||||
Map<String,String> map = new HashMap();
|
||||
map.put("error_code","0");
|
||||
map.put("msg","操作成功");
|
||||
public Map<String,Object> requireTH(InvoicingThdMainEntity dto) {
|
||||
Map<String,Object> map = new HashMap();
|
||||
map.put("success", true);
|
||||
map.put("message", "操作成功");
|
||||
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
String status = "0";//发起待执行
|
||||
|
||||
|
|
@ -655,8 +661,8 @@ public class ThdServiceImpl implements ITuiHuoApi {
|
|||
qw.eq("status", status);
|
||||
NuInvoicingThdMain qwMain = thdMainMapper.selectOne(qw);
|
||||
if(qwMain!=null){
|
||||
map.put("error_code","1");
|
||||
map.put("msg","退货单已存在");
|
||||
map.put("success", false);
|
||||
map.put("message", "退货单已存在");
|
||||
}
|
||||
|
||||
NuInvoicingThdMain main = new NuInvoicingThdMain();
|
||||
|
|
@ -677,16 +683,16 @@ public class ThdServiceImpl implements ITuiHuoApi {
|
|||
logData.setElderId(main.getElderId());//长者id
|
||||
thdLogMapper.insert(logData);
|
||||
|
||||
InvoicingOrdersEntity orderEntity = new InvoicingOrdersEntity();
|
||||
orderEntity.setFlowCode("dyth_cksh");//指令流程flow_code 看接口有标明
|
||||
orderEntity.setPoolId(main.getId());//退货主表id 入库时会根据更新为对应退货单号(入库时才生成的退货单号)
|
||||
orderEntity.setNuId(dto.getNuId());
|
||||
// orderEntity.setNuName(dto.getNuName());
|
||||
orderEntity.setElderId(dto.getElderId());//长者id
|
||||
// orderEntity.setElderName(dto.getElderName());//长者姓名
|
||||
orderEntity.setInitiatorId(sysUser.getEmployessId());//员工id
|
||||
orderEntity.setInitiatorName(sysUser.getRealname());//员工姓名
|
||||
invoicingThOrdersApi.flowDythCksh(orderEntity);
|
||||
// InvoicingOrdersEntity orderEntity = new InvoicingOrdersEntity();
|
||||
// orderEntity.setFlowCode("dyth_cksh");//指令流程flow_code 看接口有标明
|
||||
// orderEntity.setPoolId(main.getId());//退货主表id 入库时会根据更新为对应退货单号(入库时才生成的退货单号)
|
||||
// orderEntity.setNuId(dto.getNuId());
|
||||
//// orderEntity.setNuName(dto.getNuName());
|
||||
// orderEntity.setElderId(dto.getElderId());//长者id
|
||||
//// orderEntity.setElderName(dto.getElderName());//长者姓名
|
||||
// orderEntity.setInitiatorId(sysUser.getEmployessId());//员工id
|
||||
// orderEntity.setInitiatorName(sysUser.getRealname());//员工姓名
|
||||
// invoicingThOrdersApi.flowDythCksh(orderEntity);
|
||||
return map;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -14,23 +14,23 @@ import java.util.Map;
|
|||
*/
|
||||
public interface IInvoicingOrdersApi {
|
||||
|
||||
/**
|
||||
* 获取指令工单信息
|
||||
* @param invoicingOrdersEntity
|
||||
*/
|
||||
InvoicingOrdersEntity getOrderInfo(InvoicingOrdersEntity invoicingOrdersEntity);
|
||||
// /**
|
||||
// * 获取指令工单信息
|
||||
// * @param invoicingOrdersEntity
|
||||
// */
|
||||
// InvoicingOrdersEntity getOrderInfo(InvoicingOrdersEntity invoicingOrdersEntity);
|
||||
|
||||
/**
|
||||
* 点击开始
|
||||
* @param invoicingOrdersEntity
|
||||
*/
|
||||
Map<String,String> beginOrder(InvoicingOrdersEntity invoicingOrdersEntity);
|
||||
Map<String,Object> beginOrder(InvoicingOrdersEntity invoicingOrdersEntity);
|
||||
|
||||
/**
|
||||
* 点击完成
|
||||
* @param invoicingOrdersEntity
|
||||
*/
|
||||
Map<String,String> finishOrder(InvoicingOrdersEntity invoicingOrdersEntity);
|
||||
Map<String,Object> finishOrder(InvoicingOrdersEntity invoicingOrdersEntity);
|
||||
|
||||
/**
|
||||
* 根据工单id查询工单信息+对应服务指令信息
|
||||
|
|
|
|||
|
|
@ -6,30 +6,30 @@ import org.jeecg.common.api.vo.Result;
|
|||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @Description: 仓库类服务指令盘点工单
|
||||
* @Description: 仓库类服务指令盘点工单 作废
|
||||
* @Author: caolei
|
||||
* @Date: 2025-12-29
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface IInvoicingPdOrdersApi {
|
||||
|
||||
/**
|
||||
* 获取工单信息
|
||||
* @param invoicingOrdersEntity
|
||||
* @return
|
||||
*/
|
||||
InvoicingOrdersEntity getOrderInfo(InvoicingOrdersEntity invoicingOrdersEntity);
|
||||
|
||||
/**
|
||||
* 是否可提交
|
||||
* @param invoicingOrdersEntity
|
||||
*/
|
||||
Result<String> izCanAdd(InvoicingOrdersEntity invoicingOrdersEntity);
|
||||
|
||||
/**
|
||||
* 单元退货-提交时修改业务单号
|
||||
* @param invoicingOrdersEntity
|
||||
*/
|
||||
void updateOrderBizId(InvoicingOrdersEntity invoicingOrdersEntity);
|
||||
// /**
|
||||
// * 获取工单信息
|
||||
// * @param invoicingOrdersEntity
|
||||
// * @return
|
||||
// */
|
||||
// InvoicingOrdersEntity getOrderInfo(InvoicingOrdersEntity invoicingOrdersEntity);
|
||||
//
|
||||
// /**
|
||||
// * 是否可提交
|
||||
// * @param invoicingOrdersEntity
|
||||
// */
|
||||
// Result<String> izCanAdd(InvoicingOrdersEntity invoicingOrdersEntity);
|
||||
//
|
||||
// /**
|
||||
// * 单元退货-提交时修改业务单号
|
||||
// * @param invoicingOrdersEntity
|
||||
// */
|
||||
// void updateOrderBizId(InvoicingOrdersEntity invoicingOrdersEntity);
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,72 +5,72 @@ import com.nu.entity.InvoicingOrdersEntity;
|
|||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @Description: 仓库类服务指令请领工单
|
||||
* @Description: 仓库类服务指令请领工单 作废
|
||||
* @Author: caolei
|
||||
* @Date: 2025-12-25
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface IInvoicingQlOrdersApi {
|
||||
|
||||
/**
|
||||
* 请领是否可提交
|
||||
* @param invoicingOrdersEntity
|
||||
*/
|
||||
Map<String,String> izCanSubmit(InvoicingOrdersEntity invoicingOrdersEntity);
|
||||
|
||||
/**
|
||||
* 请领是否可重新提交
|
||||
* @param 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
|
||||
*/
|
||||
void updateOrderBizId(InvoicingOrdersEntity invoicingOrdersEntity);
|
||||
|
||||
/**
|
||||
* 请领流程-获取指令工单信息
|
||||
* @param invoicingOrdersEntity
|
||||
*/
|
||||
InvoicingOrdersEntity getQlOrderInfo(InvoicingOrdersEntity invoicingOrdersEntity);
|
||||
|
||||
/**
|
||||
* 请领流程-请领申请 ql_sq
|
||||
* @param invoicingOrdersEntity
|
||||
*/
|
||||
void flowQlsq(InvoicingOrdersEntity invoicingOrdersEntity);
|
||||
|
||||
/**
|
||||
* 请领流程-出库 ql_ck
|
||||
* @param invoicingOrdersEntity
|
||||
*/
|
||||
void flowQlck(InvoicingOrdersEntity invoicingOrdersEntity);
|
||||
|
||||
/**
|
||||
* 请领流程-回退 ql_ht
|
||||
* @param invoicingOrdersEntity
|
||||
*/
|
||||
void flowQlht(InvoicingOrdersEntity invoicingOrdersEntity);
|
||||
|
||||
/**
|
||||
* 请领流程-作废 ql_zf
|
||||
* @param invoicingOrdersEntity
|
||||
*/
|
||||
void flowQlzf(InvoicingOrdersEntity invoicingOrdersEntity);
|
||||
// /**
|
||||
// * 请领是否可提交
|
||||
// * @param invoicingOrdersEntity
|
||||
// */
|
||||
// Map<String,String> izCanSubmit(InvoicingOrdersEntity invoicingOrdersEntity);
|
||||
//
|
||||
// /**
|
||||
// * 请领是否可重新提交
|
||||
// * @param 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
|
||||
// */
|
||||
// void updateOrderBizId(InvoicingOrdersEntity invoicingOrdersEntity);
|
||||
//
|
||||
// /**
|
||||
// * 请领流程-获取指令工单信息
|
||||
// * @param invoicingOrdersEntity
|
||||
// */
|
||||
// InvoicingOrdersEntity getQlOrderInfo(InvoicingOrdersEntity invoicingOrdersEntity);
|
||||
//
|
||||
// /**
|
||||
// * 请领流程-请领申请 ql_sq
|
||||
// * @param invoicingOrdersEntity
|
||||
// */
|
||||
// void flowQlsq(InvoicingOrdersEntity invoicingOrdersEntity);
|
||||
//
|
||||
// /**
|
||||
// * 请领流程-出库 ql_ck
|
||||
// * @param invoicingOrdersEntity
|
||||
// */
|
||||
// void flowQlck(InvoicingOrdersEntity invoicingOrdersEntity);
|
||||
//
|
||||
// /**
|
||||
// * 请领流程-回退 ql_ht
|
||||
// * @param invoicingOrdersEntity
|
||||
// */
|
||||
// void flowQlht(InvoicingOrdersEntity invoicingOrdersEntity);
|
||||
//
|
||||
// /**
|
||||
// * 请领流程-作废 ql_zf
|
||||
// * @param invoicingOrdersEntity
|
||||
// */
|
||||
// void flowQlzf(InvoicingOrdersEntity invoicingOrdersEntity);
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,36 +5,36 @@ import com.nu.entity.InvoicingOrdersEntity;
|
|||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @Description: 仓库类服务指令退货工单
|
||||
* @Description: 仓库类服务指令退货工单 作废
|
||||
* @Author: caolei
|
||||
* @Date: 2025-12-25
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface IInvoicingThOrdersApi {
|
||||
|
||||
/**
|
||||
* 获取工单信息
|
||||
* @param invoicingOrdersEntity
|
||||
* @return
|
||||
*/
|
||||
InvoicingOrdersEntity getOrderInfo(InvoicingOrdersEntity invoicingOrdersEntity);
|
||||
|
||||
/**
|
||||
* 单元退货-仓库收货 dyth_cksh
|
||||
* @param invoicingOrdersEntity
|
||||
*/
|
||||
void flowDythCksh(InvoicingOrdersEntity invoicingOrdersEntity);
|
||||
|
||||
/**
|
||||
* 是否可提交
|
||||
* @param invoicingOrdersEntity
|
||||
*/
|
||||
Map<String,String> izCanSubmit(InvoicingOrdersEntity invoicingOrdersEntity);
|
||||
|
||||
/**
|
||||
* 单元退货-提交时修改业务单号
|
||||
* @param invoicingOrdersEntity
|
||||
*/
|
||||
void updateOrderBizId(InvoicingOrdersEntity invoicingOrdersEntity);
|
||||
// /**
|
||||
// * 获取工单信息
|
||||
// * @param invoicingOrdersEntity
|
||||
// * @return
|
||||
// */
|
||||
// InvoicingOrdersEntity getOrderInfo(InvoicingOrdersEntity invoicingOrdersEntity);
|
||||
//
|
||||
// /**
|
||||
// * 单元退货-仓库收货 dyth_cksh
|
||||
// * @param invoicingOrdersEntity
|
||||
// */
|
||||
// void flowDythCksh(InvoicingOrdersEntity invoicingOrdersEntity);
|
||||
//
|
||||
// /**
|
||||
// * 是否可提交
|
||||
// * @param invoicingOrdersEntity
|
||||
// */
|
||||
// Map<String,String> izCanSubmit(InvoicingOrdersEntity invoicingOrdersEntity);
|
||||
//
|
||||
// /**
|
||||
// * 单元退货-提交时修改业务单号
|
||||
// * @param invoicingOrdersEntity
|
||||
// */
|
||||
// void updateOrderBizId(InvoicingOrdersEntity invoicingOrdersEntity);
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -23,10 +23,10 @@ import java.util.Date;
|
|||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("nu_biz_nu_care_directive_order")
|
||||
@TableName("nu_biz_nu_directive_order")
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value="nu_biz_nu_care_directive_order对象", description="服务指令工单主表")
|
||||
@ApiModel(value="nu_biz_nu_directive_order对象", description="服务指令工单主表")
|
||||
public class CareOrders implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
/**id*/
|
||||
|
|
@ -34,6 +34,8 @@ public class CareOrders implements Serializable {
|
|||
private String id;
|
||||
/**单号*/
|
||||
private String orderNo;
|
||||
/**工单类型*/
|
||||
private String orderType;
|
||||
/**数据池子表ID*/
|
||||
private String poolId;
|
||||
/**主表id*/
|
||||
|
|
|
|||
|
|
@ -21,15 +21,19 @@ import java.util.Date;
|
|||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("nu_biz_nu_care_directive_order_sub")
|
||||
@TableName("nu_biz_nu_directive_order_sub")
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value="nu_biz_nu_care_directive_order_sub对象", description="服务指令工单子表")
|
||||
@ApiModel(value="nu_biz_nu_directive_order_sub对象", description="服务指令工单子表")
|
||||
public class CareOrdersSub implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
/**id*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
private String id;
|
||||
/**单号*/
|
||||
private String orderNo;
|
||||
/**工单类型*/
|
||||
private String orderType;
|
||||
/**主表id*/
|
||||
private String mainId;
|
||||
/**数据池子表ID*/
|
||||
|
|
|
|||
|
|
@ -60,15 +60,17 @@
|
|||
round(sum(ifnull(com_price,0)),4) as totalComPrice,
|
||||
max(start_time) as maxTime,
|
||||
sum(case when iz_finish='N' then 1 else 0 end) as ownCn
|
||||
from nu_biz_nu_care_directive_order_sub
|
||||
where start_time >=DATE_FORMAT(NOW(), '%Y-%m-%d 00:00:00')
|
||||
from nu_biz_nu_directive_order_sub
|
||||
where order_type = '1'
|
||||
and start_time >=DATE_FORMAT(NOW(), '%Y-%m-%d 00:00:00')
|
||||
and start_time <=DATE_FORMAT(NOW(), '%Y-%m-%d 23:59:59')
|
||||
group by employee_id
|
||||
) e on a.id = e.employee_id
|
||||
left join (
|
||||
select employee_id,sum(case when iz_finish='N' then 1 else 0 end) as orderNum
|
||||
from nu_biz_nu_care_directive_order_sub
|
||||
where start_time = #{startTime}
|
||||
from nu_biz_nu_directive_order_sub
|
||||
where order_type = '1'
|
||||
and start_time = #{startTime}
|
||||
or (start_time < #{startTime} and end_time > #{startTime})
|
||||
group by employee_id
|
||||
) f on a.id = f.employee_id
|
||||
|
|
|
|||
|
|
@ -121,19 +121,23 @@ public class CareOrdersServiceImpl extends ServiceImpl<CareOrdersMapper, CareOrd
|
|||
//获取满足条件的员工
|
||||
CareOrders employee = employeeScreening(directiveIds,orders.getElderId(),null,orders.getStartTime());
|
||||
if(employee!=null){
|
||||
getOrderNo(orders);
|
||||
String orderNo = getOrderNo();
|
||||
orders.setOrderNo(orderNo);
|
||||
orders.setEmployeeId(employee.getEmployeeId());
|
||||
orders.setEmployeeName(employee.getEmployeeName());
|
||||
orders.setIzStart("N");
|
||||
orders.setIzFinish("N");
|
||||
orders.setOrderType("1");
|
||||
this.save(orders);//生成工单主表
|
||||
for(int i=0;i<ordersSubList.size();i++){
|
||||
CareOrdersSub ordersSub = ordersSubList.get(i);
|
||||
ordersSub.setOrderNo(getOrderSubNo(orderNo));
|
||||
ordersSub.setMainId(orders.getId());
|
||||
ordersSub.setEmployeeId(employee.getEmployeeId());
|
||||
ordersSub.setEmployeeName(employee.getEmployeeName());
|
||||
ordersSub.setIzStart("N");
|
||||
ordersSub.setIzFinish("N");
|
||||
ordersSub.setOrderType("1");
|
||||
ordersSubService.save(ordersSub);//生成工单子表
|
||||
}
|
||||
baseMapper.updatePoolIzOrder(orders.getPoolId());
|
||||
|
|
@ -148,7 +152,8 @@ public class CareOrdersServiceImpl extends ServiceImpl<CareOrdersMapper, CareOrd
|
|||
String employeeIds = emps.stream().map(CareOrders::getEmployeeId).collect(Collectors.joining(","));
|
||||
CareOrders employee = employeeScreening(directiveIds,orders.getElderId(),employeeIds,orders.getStartTime());
|
||||
if(employee!=null){
|
||||
getOrderNo(orders);
|
||||
String orderNo = getOrderNo();
|
||||
orders.setOrderNo(orderNo);
|
||||
orders.setEmployeeId(employee.getEmployeeId());
|
||||
orders.setEmployeeName(employee.getEmployeeName());
|
||||
orders.setIzStart("N");
|
||||
|
|
@ -156,6 +161,7 @@ public class CareOrdersServiceImpl extends ServiceImpl<CareOrdersMapper, CareOrd
|
|||
this.save(orders);//生成工单主表
|
||||
for(int i=0;i<ordersSubList.size();i++){
|
||||
CareOrdersSub ordersSub = ordersSubList.get(i);
|
||||
ordersSub.setOrderNo(getOrderSubNo(orderNo));
|
||||
ordersSub.setMainId(orders.getId());
|
||||
ordersSub.setEmployeeId(employee.getEmployeeId());
|
||||
ordersSub.setEmployeeName(employee.getEmployeeName());
|
||||
|
|
@ -524,7 +530,7 @@ public class CareOrdersServiceImpl extends ServiceImpl<CareOrdersMapper, CareOrd
|
|||
* 获取单号
|
||||
* @return
|
||||
*/
|
||||
private void getOrderNo(CareOrders orders){
|
||||
private String getOrderNo(){
|
||||
JSONObject deptInfo = sysBaseAPI.getDeptInfo();
|
||||
String deptCode = deptInfo.getString("code");
|
||||
String today = LocalDate.now().format(DateTimeFormatter.ofPattern("yyyyMMdd"));
|
||||
|
|
@ -537,21 +543,39 @@ public class CareOrdersServiceImpl extends ServiceImpl<CareOrdersMapper, CareOrd
|
|||
qw.last("limit 1");
|
||||
CareOrders entity = this.getOne(qw);
|
||||
int todayNo = 0;
|
||||
int totalNo = 0;
|
||||
if(entity!=null){
|
||||
String orderNo = entity.getOrderNo();
|
||||
if(orderNo!=null&&!orderNo.equals("")){
|
||||
String no = orderNo.substring(todayPrefix.length());
|
||||
String todayNoStr = no.substring(0,4);
|
||||
String totalNoStr = no.substring(5);
|
||||
String todayNoStr = orderNo.substring(todayPrefix.length());
|
||||
todayNo = Integer.parseInt(todayNoStr);
|
||||
totalNo = Integer.parseInt(totalNoStr);
|
||||
}
|
||||
}
|
||||
todayNo = todayNo +1;
|
||||
totalNo = totalNo +1;
|
||||
String frontNo = String.format("%04d", todayNo);
|
||||
String backNo = String.format("%07d", totalNo);
|
||||
orders.setOrderNo(todayPrefix+frontNo+backNo);
|
||||
return todayPrefix+frontNo;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取子单号
|
||||
* @return
|
||||
*/
|
||||
private String getOrderSubNo(String mainOrderNo){
|
||||
QueryWrapper<CareOrdersSub> qw = new QueryWrapper<>();
|
||||
qw.likeRight("order_no", mainOrderNo);
|
||||
qw.select("order_no");
|
||||
qw.orderByDesc("order_no");
|
||||
qw.last("limit 1");
|
||||
CareOrdersSub entity = ordersSubService.getOne(qw);
|
||||
int todayNo = 0;
|
||||
if(entity!=null){
|
||||
String orderNo = entity.getOrderNo();
|
||||
if(orderNo!=null&&!orderNo.equals("")){
|
||||
String todayNoStr = orderNo.substring(mainOrderNo.length());
|
||||
todayNo = Integer.parseInt(todayNoStr);
|
||||
}
|
||||
}
|
||||
todayNo = todayNo +1;
|
||||
String frontNo = String.format("%03d", todayNo);
|
||||
return mainOrderNo+frontNo;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -33,6 +33,8 @@ public class InvoicingOrders implements Serializable {
|
|||
private String id;
|
||||
/**单号*/
|
||||
private String orderNo;
|
||||
/**工单类型*/
|
||||
private String orderType;
|
||||
/**数据池子表ID*/
|
||||
private String poolId;
|
||||
/**业务主表id,或者主表单号*/
|
||||
|
|
|
|||
|
|
@ -27,7 +27,6 @@ public interface InvoicingOrdersMapper extends BaseMapper<InvoicingOrders> {
|
|||
List<InvoicingOrders> getPermissionEmps(@Param("directiveIds") String directiveIds);
|
||||
List<InvoicingOrders> getFlowList(InvoicingOrdersEntity invoicingOrdersEntity);
|
||||
InvoicingOrders getFlowOne(InvoicingOrders invoicingOrders);
|
||||
void cancelOrder(InvoicingOrders invoicingOrders);
|
||||
InvoicingOrders getOrderOne(InvoicingOrders invoicingOrders);
|
||||
|
||||
InvoicingDirectiveEntity selectInfoById(@Param("id") String id);
|
||||
|
|
|
|||
|
|
@ -94,16 +94,18 @@
|
|||
round(sum(ifnull(com_price,0)),4) as totalComPrice,
|
||||
max(start_time) as maxTime,
|
||||
sum(case when iz_finish='N' then 1 else 0 end) as ownCn
|
||||
from nu_biz_nu_invoicing_directive_order
|
||||
where start_time >=DATE_FORMAT(NOW(), '%Y-%m-%d 00:00:00')
|
||||
from nu_biz_nu_directive_order
|
||||
where order_type = '3'
|
||||
and start_time >=DATE_FORMAT(NOW(), '%Y-%m-%d 00:00:00')
|
||||
and start_time <=DATE_FORMAT(NOW(), '%Y-%m-%d 23:59:59')
|
||||
and del_flag = '0'
|
||||
group by employee_id
|
||||
) e on a.id = e.employee_id
|
||||
left join (
|
||||
select employee_id,sum(case when iz_finish='N' then 1 else 0 end) as orderNum
|
||||
from nu_biz_nu_invoicing_directive_order
|
||||
where start_time = #{startTime}
|
||||
from nu_biz_nu_directive_order
|
||||
where order_type = '3'
|
||||
and start_time = #{startTime}
|
||||
or (start_time < #{startTime} and end_time > #{startTime})
|
||||
and del_flag = '0'
|
||||
group by employee_id
|
||||
|
|
@ -201,15 +203,6 @@
|
|||
</where>
|
||||
</select>
|
||||
|
||||
<update id="cancelOrder">
|
||||
update nu_biz_nu_invoicing_directive_order
|
||||
set iz_cancel = 'Y',
|
||||
cancel_time = #{cancelTime},
|
||||
cancel_emp = #{cancelEmp},
|
||||
remarks = #{remarks}
|
||||
where biz_id = #{bizId}
|
||||
</update>
|
||||
|
||||
<select id="getOrderOne" resultType="com.nu.modules.biz.invoicing.order.entity.InvoicingOrders">
|
||||
select
|
||||
a.id,
|
||||
|
|
@ -255,9 +248,8 @@
|
|||
a.initiator_id as initiatorId,
|
||||
a.initiator_name as initiatorName,
|
||||
a.remarks,
|
||||
a.biz_type as flowCode,
|
||||
a.pad_path as padPath
|
||||
from nu_biz_nu_invoicing_directive_order a
|
||||
a.biz_type as flowCode
|
||||
from nu_biz_nu_directive_order a
|
||||
<where>
|
||||
<if test="id != null and id != ''">
|
||||
and id = #{id}
|
||||
|
|
@ -302,7 +294,7 @@
|
|||
<select id="selectInfoById" resultType="com.nu.entity.InvoicingDirectiveEntity">
|
||||
select a.*,
|
||||
mainStatus.item_text AS optTypeName
|
||||
from nu_biz_nu_invoicing_directive_order a
|
||||
from nu_biz_nu_directive_order a
|
||||
LEFT JOIN sys_dict dict ON dict.dict_code = 'directive_order_opt_type'
|
||||
LEFT JOIN sys_dict_item mainStatus
|
||||
ON mainStatus.dict_id = dict.id AND mainStatus.item_value = a.opt_type
|
||||
|
|
|
|||
|
|
@ -69,31 +69,28 @@ public class InvoicingOrdersServiceImpl extends ServiceImpl<InvoicingOrdersMappe
|
|||
orders.setEmployeeName(employee.getEmployeeName());
|
||||
orders.setIzStart("N");
|
||||
orders.setIzFinish("N");
|
||||
orders.setIzRollback("N");
|
||||
orders.setOrderType("3");
|
||||
this.save(orders);//生成工单主表
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取指令工单信息
|
||||
*
|
||||
* @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 InvoicingOrdersEntity getOrderInfo(InvoicingOrdersEntity 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;
|
||||
// }
|
||||
|
||||
/**
|
||||
* 点击开始
|
||||
|
|
@ -101,12 +98,10 @@ public class InvoicingOrdersServiceImpl extends ServiceImpl<InvoicingOrdersMappe
|
|||
* @param invoicingOrdersEntity
|
||||
*/
|
||||
@Override
|
||||
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", "开始成功");
|
||||
public Map<String, Object> beginOrder(InvoicingOrdersEntity invoicingOrdersEntity) {
|
||||
Map<String, Object> map = new HashMap();
|
||||
map.put("success", true);
|
||||
map.put("message", "开始成功");
|
||||
InvoicingOrders io = new InvoicingOrders();
|
||||
BeanUtils.copyProperties(invoicingOrdersEntity, io);
|
||||
InvoicingOrders invoicingOrders = baseMapper.getOrderOne(io);
|
||||
|
|
@ -120,12 +115,12 @@ public class InvoicingOrdersServiceImpl extends ServiceImpl<InvoicingOrdersMappe
|
|||
entity.setId(invoicingOrdersEntity.getId());
|
||||
baseMapper.updateById(entity);
|
||||
} else {
|
||||
map.put("error_code", "1");
|
||||
map.put("msg", "工单已开始");
|
||||
map.put("success", false);
|
||||
map.put("message", "工单已开始");
|
||||
}
|
||||
} else {
|
||||
map.put("error_code", "1");
|
||||
map.put("msg", "工单不存在");
|
||||
map.put("success", false);
|
||||
map.put("message", "工单不存在");
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
|
@ -136,12 +131,10 @@ public class InvoicingOrdersServiceImpl extends ServiceImpl<InvoicingOrdersMappe
|
|||
* @param invoicingOrdersEntity
|
||||
*/
|
||||
@Override
|
||||
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", "结束成功");
|
||||
public Map<String, Object> finishOrder(InvoicingOrdersEntity invoicingOrdersEntity) {
|
||||
Map<String, Object> map = new HashMap();
|
||||
map.put("success",true);
|
||||
map.put("message","结束成功");
|
||||
InvoicingOrders io = new InvoicingOrders();
|
||||
BeanUtils.copyProperties(invoicingOrdersEntity, io);
|
||||
InvoicingOrders invoicingOrders = baseMapper.getOrderOne(io);
|
||||
|
|
@ -162,16 +155,16 @@ public class InvoicingOrdersServiceImpl extends ServiceImpl<InvoicingOrdersMappe
|
|||
entity.setComPrice(DirectivePrice.getComPrice());
|
||||
baseMapper.updateById(entity);
|
||||
} else {
|
||||
map.put("error_code", "1");
|
||||
map.put("msg", "工单已结束");
|
||||
map.put("success", false);
|
||||
map.put("message", "工单已结束");
|
||||
}
|
||||
} else {
|
||||
map.put("error_code", "1");
|
||||
map.put("msg", "工单未开始");
|
||||
map.put("success", false);
|
||||
map.put("message", "工单未开始");
|
||||
}
|
||||
} else {
|
||||
map.put("error_code", "1");
|
||||
map.put("msg", "工单不存在");
|
||||
map.put("success", false);
|
||||
map.put("message", "工单不存在");
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -25,76 +25,76 @@ import java.util.*;
|
|||
@Slf4j
|
||||
public class PdOrdersServiceImpl extends ServiceImpl<InvoicingOrdersMapper, InvoicingOrders> implements IPdOrdersService, IInvoicingPdOrdersApi {
|
||||
|
||||
@Autowired
|
||||
IEmpOrdersService empOrdersService;
|
||||
// @Autowired
|
||||
// IEmpOrdersService empOrdersService;
|
||||
|
||||
/**
|
||||
* 获取工单信息
|
||||
* @param invoicingOrdersEntity
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public InvoicingOrdersEntity getOrderInfo(InvoicingOrdersEntity invoicingOrdersEntity){
|
||||
log.info("function:getOrderInfo");
|
||||
log.info("id:"+invoicingOrdersEntity.getId());
|
||||
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
|
||||
// * @return
|
||||
// */
|
||||
// @Override
|
||||
// public InvoicingOrdersEntity getOrderInfo(InvoicingOrdersEntity invoicingOrdersEntity){
|
||||
// log.info("function:getOrderInfo");
|
||||
// log.info("id:"+invoicingOrdersEntity.getId());
|
||||
// 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 Result<String> izCanAdd(InvoicingOrdersEntity invoicingOrdersEntity){
|
||||
InvoicingOrders io = new InvoicingOrders();
|
||||
BeanUtils.copyProperties(invoicingOrdersEntity, io);
|
||||
InvoicingOrders entity = baseMapper.getOrderOne(io);
|
||||
if(entity!=null){
|
||||
if(!"Y".equals(entity.getIzStart())) {
|
||||
return Result.error("工单未开始");
|
||||
}
|
||||
if(!"".equals(entity.getBizId())) {
|
||||
return Result.error("工单未开始");
|
||||
}
|
||||
}else{
|
||||
return Result.error("工单不存在");
|
||||
}
|
||||
return Result.OK("可以新增");
|
||||
}
|
||||
// /**
|
||||
// * 是否可提交
|
||||
// * @param invoicingOrdersEntity
|
||||
// */
|
||||
// @Override
|
||||
// public Result<String> izCanAdd(InvoicingOrdersEntity invoicingOrdersEntity){
|
||||
// InvoicingOrders io = new InvoicingOrders();
|
||||
// BeanUtils.copyProperties(invoicingOrdersEntity, io);
|
||||
// InvoicingOrders entity = baseMapper.getOrderOne(io);
|
||||
// if(entity!=null){
|
||||
// if(!"Y".equals(entity.getIzStart())) {
|
||||
// return Result.error("工单未开始");
|
||||
// }
|
||||
// if(!"".equals(entity.getBizId())) {
|
||||
// return Result.error("工单未开始");
|
||||
// }
|
||||
// }else{
|
||||
// return Result.error("工单不存在");
|
||||
// }
|
||||
// return Result.OK("可以新增");
|
||||
// }
|
||||
|
||||
/**
|
||||
* 单元退货流程中提交时修改业务单号
|
||||
* @param invoicingOrdersEntity
|
||||
*/
|
||||
@Override
|
||||
public void updateOrderBizId(InvoicingOrdersEntity invoicingOrdersEntity){
|
||||
log.info("function:updateOrderBizId");
|
||||
log.info("PoolId:"+invoicingOrdersEntity.getPoolId());
|
||||
log.info("BizId:"+invoicingOrdersEntity.getBizId());
|
||||
log.info("UpdateBy:"+invoicingOrdersEntity.getInitiatorId());
|
||||
empOrdersService.getNames(invoicingOrdersEntity);
|
||||
QueryWrapper<InvoicingOrders> ioQw = new QueryWrapper<>();
|
||||
ioQw.eq("pool_id", invoicingOrdersEntity.getPoolId());
|
||||
InvoicingOrders order = this.getOne(ioQw);
|
||||
log.info("order:"+order);
|
||||
if(order!=null){
|
||||
log.info("OrderId:"+order.getId());
|
||||
//修改请领单的bizId
|
||||
InvoicingOrders entity = new InvoicingOrders();
|
||||
entity.setId(order.getId());
|
||||
entity.setBizId(invoicingOrdersEntity.getBizId());
|
||||
entity.setUpdateEmp(invoicingOrdersEntity.getInitiatorId());
|
||||
entity.setUpdateTime(new Date());
|
||||
baseMapper.updateById(entity);
|
||||
}
|
||||
}
|
||||
// /**
|
||||
// * 单元退货流程中提交时修改业务单号
|
||||
// * @param invoicingOrdersEntity
|
||||
// */
|
||||
// @Override
|
||||
// public void updateOrderBizId(InvoicingOrdersEntity invoicingOrdersEntity){
|
||||
// log.info("function:updateOrderBizId");
|
||||
// log.info("PoolId:"+invoicingOrdersEntity.getPoolId());
|
||||
// log.info("BizId:"+invoicingOrdersEntity.getBizId());
|
||||
// log.info("UpdateBy:"+invoicingOrdersEntity.getInitiatorId());
|
||||
// empOrdersService.getNames(invoicingOrdersEntity);
|
||||
// QueryWrapper<InvoicingOrders> ioQw = new QueryWrapper<>();
|
||||
// ioQw.eq("pool_id", invoicingOrdersEntity.getPoolId());
|
||||
// InvoicingOrders order = this.getOne(ioQw);
|
||||
// log.info("order:"+order);
|
||||
// if(order!=null){
|
||||
// log.info("OrderId:"+order.getId());
|
||||
// //修改请领单的bizId
|
||||
// InvoicingOrders entity = new InvoicingOrders();
|
||||
// entity.setId(order.getId());
|
||||
// entity.setBizId(invoicingOrdersEntity.getBizId());
|
||||
// entity.setUpdateEmp(invoicingOrdersEntity.getInitiatorId());
|
||||
// entity.setUpdateTime(new Date());
|
||||
// baseMapper.updateById(entity);
|
||||
// }
|
||||
// }
|
||||
|
||||
}
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -32,252 +32,252 @@ import java.util.*;
|
|||
@Slf4j
|
||||
public class ThOrdersServiceImpl extends ServiceImpl<InvoicingOrdersMapper, InvoicingOrders> implements IThOrdersService, IInvoicingThOrdersApi {
|
||||
|
||||
@Autowired
|
||||
IEmpOrdersService empOrdersService;
|
||||
@Autowired
|
||||
private ISysConfigApi sysConfigApi;
|
||||
@Autowired
|
||||
private ISysBaseAPI sysBaseAPI;
|
||||
private String serverNetUrl;
|
||||
|
||||
/**
|
||||
* 获取工单信息
|
||||
* @param invoicingOrdersEntity
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public InvoicingOrdersEntity getOrderInfo(InvoicingOrdersEntity invoicingOrdersEntity){
|
||||
log.info("function:getOrderInfo");
|
||||
log.info("id:"+invoicingOrdersEntity.getId());
|
||||
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 flowDythCksh(InvoicingOrdersEntity invoicingOrdersEntity){
|
||||
empOrdersService.getNames(invoicingOrdersEntity);
|
||||
List<InvoicingOrders> flowList = baseMapper.getFlowList(invoicingOrdersEntity);
|
||||
if(flowList!=null){
|
||||
Calendar c = Calendar.getInstance();
|
||||
InvoicingOrders flow = flowList.get(0);
|
||||
if(flow!=null){
|
||||
InvoicingOrders employee = empOrdersService.employeeScreening(flow.getDirectiveId(), invoicingOrdersEntity.getElderId(), c.getTime());
|
||||
insertNextOrder(flow,invoicingOrdersEntity,employee.getEmployeeId(),employee.getEmployeeName(),invoicingOrdersEntity.getInitiatorId(),invoicingOrdersEntity.getInitiatorName(),flow.getFlowCode(),"N");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 是否可提交
|
||||
* @param invoicingOrdersEntity
|
||||
*/
|
||||
@Override
|
||||
public Map<String,String> izCanSubmit(InvoicingOrdersEntity invoicingOrdersEntity){
|
||||
log.info("function:izCanSubmit");
|
||||
log.info("PoolId:"+invoicingOrdersEntity.getPoolId());
|
||||
Map<String,String> map = new HashMap();
|
||||
map.put("error_code","0");
|
||||
map.put("msg","可以提交");
|
||||
InvoicingOrders io = new InvoicingOrders();
|
||||
BeanUtils.copyProperties(invoicingOrdersEntity, io);
|
||||
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 void updateOrderBizId(InvoicingOrdersEntity invoicingOrdersEntity){
|
||||
log.info("function:updateOrderBizId");
|
||||
log.info("PoolId:"+invoicingOrdersEntity.getPoolId());
|
||||
log.info("BizId:"+invoicingOrdersEntity.getBizId());
|
||||
log.info("UpdateBy:"+invoicingOrdersEntity.getInitiatorId());
|
||||
empOrdersService.getNames(invoicingOrdersEntity);
|
||||
QueryWrapper<InvoicingOrders> ioQw = new QueryWrapper<>();
|
||||
ioQw.eq("pool_id", invoicingOrdersEntity.getPoolId());
|
||||
InvoicingOrders order = this.getOne(ioQw);
|
||||
log.info("order:"+order);
|
||||
if(order!=null){
|
||||
log.info("OrderId:"+order.getId());
|
||||
//修改请领单的bizId
|
||||
InvoicingOrders entity = new InvoicingOrders();
|
||||
entity.setId(order.getId());
|
||||
entity.setBizId(invoicingOrdersEntity.getBizId());
|
||||
entity.setUpdateEmp(invoicingOrdersEntity.getInitiatorId());
|
||||
entity.setUpdateTime(new Date());
|
||||
baseMapper.updateById(entity);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 增加下一步的工单
|
||||
* @param invoicingOrdersEntity
|
||||
* @param flowSub 下一节点
|
||||
* @param invoicingOrdersEntity 业务数据
|
||||
* @param employeeId 员工ID
|
||||
* @param employeeName 员工名称
|
||||
* @param bizType 操作指令编码
|
||||
*/
|
||||
private void insertNextOrder(InvoicingOrders flowSub,InvoicingOrdersEntity invoicingOrdersEntity,String employeeId,String employeeName,String initiatorId,String initiatorName,String bizType,String izRollback){
|
||||
Calendar c = Calendar.getInstance();
|
||||
getNetImages(flowSub);
|
||||
InvoicingOrders nextEntity = new InvoicingOrders();
|
||||
nextEntity.setPoolId(invoicingOrdersEntity.getPoolId());
|
||||
nextEntity.setBizType(bizType);
|
||||
nextEntity.setNuId(invoicingOrdersEntity.getNuId());
|
||||
nextEntity.setNuName(invoicingOrdersEntity.getNuName());
|
||||
nextEntity.setElderId(invoicingOrdersEntity.getElderId());
|
||||
nextEntity.setElderName(invoicingOrdersEntity.getElderName());
|
||||
nextEntity.setDirectiveId(flowSub.getDirectiveId());
|
||||
nextEntity.setDirectiveName(flowSub.getDirectiveName());
|
||||
nextEntity.setCycleTypeId(flowSub.getCycleTypeId());
|
||||
nextEntity.setCycleType(flowSub.getCycleType());
|
||||
nextEntity.setPreviewFile(flowSub.getPreviewFile());
|
||||
nextEntity.setNetPreviewFile(flowSub.getNetPreviewFile());
|
||||
nextEntity.setPreviewFileSmall(flowSub.getPreviewFileSmall());
|
||||
nextEntity.setNetPreviewFileSmall(flowSub.getNetPreviewFileSmall());
|
||||
nextEntity.setMp3File(flowSub.getMp3File());
|
||||
nextEntity.setNetMp3File(flowSub.getNetMp3File());
|
||||
nextEntity.setMp4File(flowSub.getMp4File());
|
||||
nextEntity.setNetMp4File(flowSub.getNetMp4File());
|
||||
nextEntity.setServiceDuration(flowSub.getServiceDuration());
|
||||
nextEntity.setServiceContent(flowSub.getServiceContent());
|
||||
nextEntity.setIzStart("N");
|
||||
nextEntity.setIzFinish("N");
|
||||
nextEntity.setIzRollback(izRollback);
|
||||
nextEntity.setCreateEmp(invoicingOrdersEntity.getInitiatorId());
|
||||
nextEntity.setCreateTime(c.getTime());
|
||||
nextEntity.setDelFlag("0");
|
||||
nextEntity.setInitiatorId(initiatorId);
|
||||
nextEntity.setInitiatorName(initiatorName);
|
||||
nextEntity.setStartTime(c.getTime());
|
||||
c.add(Calendar.MINUTE,Integer.valueOf(flowSub.getServiceDuration()));
|
||||
nextEntity.setEndTime(c.getTime());
|
||||
nextEntity.setEmployeeId(employeeId);
|
||||
nextEntity.setEmployeeName(employeeName);
|
||||
nextEntity.setPadPath(flowSub.getPadPath());
|
||||
getOrderNo(nextEntity);
|
||||
baseMapper.insert(nextEntity);
|
||||
|
||||
//ws推送 employeeId
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取单号
|
||||
* @return
|
||||
*/
|
||||
private void getOrderNo(InvoicingOrders orders){
|
||||
String flowCode = orders.getBizType().toUpperCase();
|
||||
String[] parts = flowCode.split("_");
|
||||
String prefix = "";
|
||||
if(parts.length>0){
|
||||
prefix = parts[0];
|
||||
}
|
||||
JSONObject deptInfo = sysBaseAPI.getDeptInfo();
|
||||
String deptCode = deptInfo.getString("code");
|
||||
String today = LocalDate.now().format(DateTimeFormatter.ofPattern("yyyyMMdd"));
|
||||
// 构建今天的前缀模式
|
||||
String todayPrefix = "CK" + prefix + deptCode + today;
|
||||
QueryWrapper<InvoicingOrders> qw = new QueryWrapper<>();
|
||||
qw.likeRight("order_no", todayPrefix);
|
||||
qw.select("order_no");
|
||||
qw.orderByDesc("order_no");
|
||||
qw.last("limit 1");
|
||||
InvoicingOrders entity = this.getOne(qw);
|
||||
int todayNo = 0;
|
||||
int totalNo = 0;
|
||||
if(entity!=null){
|
||||
String orderNo = entity.getOrderNo();
|
||||
if(orderNo!=null&&!orderNo.equals("")){
|
||||
String no = orderNo.substring(todayPrefix.length());
|
||||
String todayNoStr = no.substring(0,4);
|
||||
String totalNoStr = no.substring(5);
|
||||
todayNo = Integer.parseInt(todayNoStr);
|
||||
totalNo = Integer.parseInt(totalNoStr);
|
||||
}
|
||||
}
|
||||
todayNo = todayNo +1;
|
||||
totalNo = totalNo +1;
|
||||
String frontNo = String.format("%04d", todayNo);
|
||||
String backNo = String.format("%07d", totalNo);
|
||||
orders.setOrderNo(todayPrefix+frontNo+backNo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取管理平台静态资源路径
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
private void getOpeMediaAddress() {
|
||||
if (serverNetUrl == null || serverNetUrl.equals("")) {
|
||||
JSONObject json = sysConfigApi.getByKey("ope_media_address");
|
||||
if (json != null) {
|
||||
String configValue = json.getString("configValue");
|
||||
if (!configValue.endsWith("/")) {
|
||||
configValue += "/";
|
||||
}
|
||||
serverNetUrl = configValue;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private String getImageNetUrl(String imageUrl) {
|
||||
getOpeMediaAddress();
|
||||
return serverNetUrl + imageUrl;
|
||||
}
|
||||
|
||||
private InvoicingOrders getNetImages(InvoicingOrders invoicingOrders) {
|
||||
if (invoicingOrders.getPreviewFile() != null && !invoicingOrders.getPreviewFile().equals("")) {
|
||||
String netPreviewFile = getImageNetUrl(invoicingOrders.getPreviewFile());
|
||||
invoicingOrders.setNetPreviewFile(netPreviewFile);
|
||||
} else {
|
||||
invoicingOrders.setPreviewFile("");
|
||||
invoicingOrders.setNetPreviewFile("");
|
||||
}
|
||||
if (invoicingOrders.getPreviewFileSmall() != null && !invoicingOrders.getPreviewFileSmall().equals("")) {
|
||||
String netPreviewFileSmall = getImageNetUrl(invoicingOrders.getPreviewFileSmall());
|
||||
invoicingOrders.setNetPreviewFileSmall(netPreviewFileSmall);
|
||||
} else {
|
||||
invoicingOrders.setPreviewFileSmall("");
|
||||
invoicingOrders.setNetPreviewFileSmall("");
|
||||
}
|
||||
if (invoicingOrders.getMp3File() != null && !invoicingOrders.getMp3File().equals("")) {
|
||||
String netMp3File = getImageNetUrl(invoicingOrders.getMp3File());
|
||||
invoicingOrders.setNetMp3File(netMp3File);
|
||||
} else {
|
||||
invoicingOrders.setMp3File("");
|
||||
invoicingOrders.setNetMp3File("");
|
||||
}
|
||||
if (invoicingOrders.getMp4File() != null && !invoicingOrders.getMp4File().equals("")) {
|
||||
String netMp4File = getImageNetUrl(invoicingOrders.getMp4File());
|
||||
invoicingOrders.setNetMp4File(netMp4File);
|
||||
} else {
|
||||
invoicingOrders.setMp4File("");
|
||||
invoicingOrders.setNetMp4File("");
|
||||
}
|
||||
return invoicingOrders;
|
||||
}
|
||||
// @Autowired
|
||||
// IEmpOrdersService empOrdersService;
|
||||
// @Autowired
|
||||
// private ISysConfigApi sysConfigApi;
|
||||
// @Autowired
|
||||
// private ISysBaseAPI sysBaseAPI;
|
||||
// private String serverNetUrl;
|
||||
//
|
||||
// /**
|
||||
// * 获取工单信息
|
||||
// * @param invoicingOrdersEntity
|
||||
// * @return
|
||||
// */
|
||||
// @Override
|
||||
// public InvoicingOrdersEntity getOrderInfo(InvoicingOrdersEntity invoicingOrdersEntity){
|
||||
// log.info("function:getOrderInfo");
|
||||
// log.info("id:"+invoicingOrdersEntity.getId());
|
||||
// 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 flowDythCksh(InvoicingOrdersEntity invoicingOrdersEntity){
|
||||
// empOrdersService.getNames(invoicingOrdersEntity);
|
||||
// List<InvoicingOrders> flowList = baseMapper.getFlowList(invoicingOrdersEntity);
|
||||
// if(flowList!=null){
|
||||
// Calendar c = Calendar.getInstance();
|
||||
// InvoicingOrders flow = flowList.get(0);
|
||||
// if(flow!=null){
|
||||
// InvoicingOrders employee = empOrdersService.employeeScreening(flow.getDirectiveId(), invoicingOrdersEntity.getElderId(), c.getTime());
|
||||
// insertNextOrder(flow,invoicingOrdersEntity,employee.getEmployeeId(),employee.getEmployeeName(),invoicingOrdersEntity.getInitiatorId(),invoicingOrdersEntity.getInitiatorName(),flow.getFlowCode(),"N");
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 是否可提交
|
||||
// * @param invoicingOrdersEntity
|
||||
// */
|
||||
// @Override
|
||||
// public Map<String,String> izCanSubmit(InvoicingOrdersEntity invoicingOrdersEntity){
|
||||
// log.info("function:izCanSubmit");
|
||||
// log.info("PoolId:"+invoicingOrdersEntity.getPoolId());
|
||||
// Map<String,String> map = new HashMap();
|
||||
// map.put("error_code","0");
|
||||
// map.put("msg","可以提交");
|
||||
// InvoicingOrders io = new InvoicingOrders();
|
||||
// BeanUtils.copyProperties(invoicingOrdersEntity, io);
|
||||
// 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 void updateOrderBizId(InvoicingOrdersEntity invoicingOrdersEntity){
|
||||
// log.info("function:updateOrderBizId");
|
||||
// log.info("PoolId:"+invoicingOrdersEntity.getPoolId());
|
||||
// log.info("BizId:"+invoicingOrdersEntity.getBizId());
|
||||
// log.info("UpdateBy:"+invoicingOrdersEntity.getInitiatorId());
|
||||
// empOrdersService.getNames(invoicingOrdersEntity);
|
||||
// QueryWrapper<InvoicingOrders> ioQw = new QueryWrapper<>();
|
||||
// ioQw.eq("pool_id", invoicingOrdersEntity.getPoolId());
|
||||
// InvoicingOrders order = this.getOne(ioQw);
|
||||
// log.info("order:"+order);
|
||||
// if(order!=null){
|
||||
// log.info("OrderId:"+order.getId());
|
||||
// //修改请领单的bizId
|
||||
// InvoicingOrders entity = new InvoicingOrders();
|
||||
// entity.setId(order.getId());
|
||||
// entity.setBizId(invoicingOrdersEntity.getBizId());
|
||||
// entity.setUpdateEmp(invoicingOrdersEntity.getInitiatorId());
|
||||
// entity.setUpdateTime(new Date());
|
||||
// baseMapper.updateById(entity);
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 增加下一步的工单
|
||||
// * @param invoicingOrdersEntity
|
||||
// * @param flowSub 下一节点
|
||||
// * @param invoicingOrdersEntity 业务数据
|
||||
// * @param employeeId 员工ID
|
||||
// * @param employeeName 员工名称
|
||||
// * @param bizType 操作指令编码
|
||||
// */
|
||||
// private void insertNextOrder(InvoicingOrders flowSub,InvoicingOrdersEntity invoicingOrdersEntity,String employeeId,String employeeName,String initiatorId,String initiatorName,String bizType,String izRollback){
|
||||
// Calendar c = Calendar.getInstance();
|
||||
// getNetImages(flowSub);
|
||||
// InvoicingOrders nextEntity = new InvoicingOrders();
|
||||
// nextEntity.setPoolId(invoicingOrdersEntity.getPoolId());
|
||||
// nextEntity.setBizType(bizType);
|
||||
// nextEntity.setNuId(invoicingOrdersEntity.getNuId());
|
||||
// nextEntity.setNuName(invoicingOrdersEntity.getNuName());
|
||||
// nextEntity.setElderId(invoicingOrdersEntity.getElderId());
|
||||
// nextEntity.setElderName(invoicingOrdersEntity.getElderName());
|
||||
// nextEntity.setDirectiveId(flowSub.getDirectiveId());
|
||||
// nextEntity.setDirectiveName(flowSub.getDirectiveName());
|
||||
// nextEntity.setCycleTypeId(flowSub.getCycleTypeId());
|
||||
// nextEntity.setCycleType(flowSub.getCycleType());
|
||||
// nextEntity.setPreviewFile(flowSub.getPreviewFile());
|
||||
// nextEntity.setNetPreviewFile(flowSub.getNetPreviewFile());
|
||||
// nextEntity.setPreviewFileSmall(flowSub.getPreviewFileSmall());
|
||||
// nextEntity.setNetPreviewFileSmall(flowSub.getNetPreviewFileSmall());
|
||||
// nextEntity.setMp3File(flowSub.getMp3File());
|
||||
// nextEntity.setNetMp3File(flowSub.getNetMp3File());
|
||||
// nextEntity.setMp4File(flowSub.getMp4File());
|
||||
// nextEntity.setNetMp4File(flowSub.getNetMp4File());
|
||||
// nextEntity.setServiceDuration(flowSub.getServiceDuration());
|
||||
// nextEntity.setServiceContent(flowSub.getServiceContent());
|
||||
// nextEntity.setIzStart("N");
|
||||
// nextEntity.setIzFinish("N");
|
||||
// nextEntity.setIzRollback(izRollback);
|
||||
// nextEntity.setCreateEmp(invoicingOrdersEntity.getInitiatorId());
|
||||
// nextEntity.setCreateTime(c.getTime());
|
||||
// nextEntity.setDelFlag("0");
|
||||
// nextEntity.setInitiatorId(initiatorId);
|
||||
// nextEntity.setInitiatorName(initiatorName);
|
||||
// nextEntity.setStartTime(c.getTime());
|
||||
// c.add(Calendar.MINUTE,Integer.valueOf(flowSub.getServiceDuration()));
|
||||
// nextEntity.setEndTime(c.getTime());
|
||||
// nextEntity.setEmployeeId(employeeId);
|
||||
// nextEntity.setEmployeeName(employeeName);
|
||||
// nextEntity.setPadPath(flowSub.getPadPath());
|
||||
// getOrderNo(nextEntity);
|
||||
// baseMapper.insert(nextEntity);
|
||||
//
|
||||
// //ws推送 employeeId
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 获取单号
|
||||
// * @return
|
||||
// */
|
||||
// private void getOrderNo(InvoicingOrders orders){
|
||||
// String flowCode = orders.getBizType().toUpperCase();
|
||||
// String[] parts = flowCode.split("_");
|
||||
// String prefix = "";
|
||||
// if(parts.length>0){
|
||||
// prefix = parts[0];
|
||||
// }
|
||||
// JSONObject deptInfo = sysBaseAPI.getDeptInfo();
|
||||
// String deptCode = deptInfo.getString("code");
|
||||
// String today = LocalDate.now().format(DateTimeFormatter.ofPattern("yyyyMMdd"));
|
||||
// // 构建今天的前缀模式
|
||||
// String todayPrefix = "CK" + prefix + deptCode + today;
|
||||
// QueryWrapper<InvoicingOrders> qw = new QueryWrapper<>();
|
||||
// qw.likeRight("order_no", todayPrefix);
|
||||
// qw.select("order_no");
|
||||
// qw.orderByDesc("order_no");
|
||||
// qw.last("limit 1");
|
||||
// InvoicingOrders entity = this.getOne(qw);
|
||||
// int todayNo = 0;
|
||||
// int totalNo = 0;
|
||||
// if(entity!=null){
|
||||
// String orderNo = entity.getOrderNo();
|
||||
// if(orderNo!=null&&!orderNo.equals("")){
|
||||
// String no = orderNo.substring(todayPrefix.length());
|
||||
// String todayNoStr = no.substring(0,4);
|
||||
// String totalNoStr = no.substring(5);
|
||||
// todayNo = Integer.parseInt(todayNoStr);
|
||||
// totalNo = Integer.parseInt(totalNoStr);
|
||||
// }
|
||||
// }
|
||||
// todayNo = todayNo +1;
|
||||
// totalNo = totalNo +1;
|
||||
// String frontNo = String.format("%04d", todayNo);
|
||||
// String backNo = String.format("%07d", totalNo);
|
||||
// orders.setOrderNo(todayPrefix+frontNo+backNo);
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 获取管理平台静态资源路径
|
||||
// *
|
||||
// * @return
|
||||
// */
|
||||
// private void getOpeMediaAddress() {
|
||||
// if (serverNetUrl == null || serverNetUrl.equals("")) {
|
||||
// JSONObject json = sysConfigApi.getByKey("ope_media_address");
|
||||
// if (json != null) {
|
||||
// String configValue = json.getString("configValue");
|
||||
// if (!configValue.endsWith("/")) {
|
||||
// configValue += "/";
|
||||
// }
|
||||
// serverNetUrl = configValue;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// private String getImageNetUrl(String imageUrl) {
|
||||
// getOpeMediaAddress();
|
||||
// return serverNetUrl + imageUrl;
|
||||
// }
|
||||
//
|
||||
// private InvoicingOrders getNetImages(InvoicingOrders invoicingOrders) {
|
||||
// if (invoicingOrders.getPreviewFile() != null && !invoicingOrders.getPreviewFile().equals("")) {
|
||||
// String netPreviewFile = getImageNetUrl(invoicingOrders.getPreviewFile());
|
||||
// invoicingOrders.setNetPreviewFile(netPreviewFile);
|
||||
// } else {
|
||||
// invoicingOrders.setPreviewFile("");
|
||||
// invoicingOrders.setNetPreviewFile("");
|
||||
// }
|
||||
// if (invoicingOrders.getPreviewFileSmall() != null && !invoicingOrders.getPreviewFileSmall().equals("")) {
|
||||
// String netPreviewFileSmall = getImageNetUrl(invoicingOrders.getPreviewFileSmall());
|
||||
// invoicingOrders.setNetPreviewFileSmall(netPreviewFileSmall);
|
||||
// } else {
|
||||
// invoicingOrders.setPreviewFileSmall("");
|
||||
// invoicingOrders.setNetPreviewFileSmall("");
|
||||
// }
|
||||
// if (invoicingOrders.getMp3File() != null && !invoicingOrders.getMp3File().equals("")) {
|
||||
// String netMp3File = getImageNetUrl(invoicingOrders.getMp3File());
|
||||
// invoicingOrders.setNetMp3File(netMp3File);
|
||||
// } else {
|
||||
// invoicingOrders.setMp3File("");
|
||||
// invoicingOrders.setNetMp3File("");
|
||||
// }
|
||||
// if (invoicingOrders.getMp4File() != null && !invoicingOrders.getMp4File().equals("")) {
|
||||
// String netMp4File = getImageNetUrl(invoicingOrders.getMp4File());
|
||||
// invoicingOrders.setNetMp4File(netMp4File);
|
||||
// } else {
|
||||
// invoicingOrders.setMp4File("");
|
||||
// invoicingOrders.setNetMp4File("");
|
||||
// }
|
||||
// return invoicingOrders;
|
||||
// }
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue