From 6f5a08663a9478235141953be06df51851c70c89 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9B=B9=E7=A3=8A?= <45566618@qq.com> Date: Tue, 23 Dec 2025 15:37:34 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9C=8D=E5=8A=A1=E6=8C=87=E4=BB=A4-=E5=B7=A5?= =?UTF-8?q?=E5=8D=95=E5=A2=9E=E5=8A=A0=E5=8D=95=E5=8F=B7=E5=AD=97=E6=AE=B5?= =?UTF-8?q?=EF=BC=8C=E5=A2=9E=E5=8A=A0pad=E8=B7=AF=E5=BE=84=E5=AD=97?= =?UTF-8?q?=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/nu/entity/CareOrdersSubEntity.java | 4 + .../com/nu/entity/InvoicingOrdersEntity.java | 5 +- .../invoicing/api/IInvoicingOrdersApi.java | 28 +- .../biz/care/order/entity/CareOrders.java | 4 + .../service/impl/CareOrdersServiceImpl.java | 46 ++- .../order/entity/InvoicingOrders.java | 5 + .../mapper/xml/InvoicingOrdersMapper.xml | 21 +- .../impl/InvoicingOrdersServiceImpl.java | 261 +++++++----------- .../service/impl/QlOrdersServiceImpl.java | 53 +++- .../service/impl/ThOrdersServiceImpl.java | 48 ++++ .../config/flow/entity/ServiceFlowSub.java | 3 + 11 files changed, 290 insertions(+), 188 deletions(-) diff --git a/nursing-unit-common/src/main/java/com/nu/entity/CareOrdersSubEntity.java b/nursing-unit-common/src/main/java/com/nu/entity/CareOrdersSubEntity.java index 557b48af..30024f97 100644 --- a/nursing-unit-common/src/main/java/com/nu/entity/CareOrdersSubEntity.java +++ b/nursing-unit-common/src/main/java/com/nu/entity/CareOrdersSubEntity.java @@ -25,6 +25,8 @@ public class CareOrdersSubEntity implements Serializable { private static final long serialVersionUID = 1L; /**id*/ private String id; + /**单号*/ + private String orderNo; /**主表id*/ private String mainId; /**数据池子表ID*/ @@ -129,6 +131,8 @@ public class CareOrdersSubEntity implements Serializable { private Date updateTime; /**是否删除 0未删除 1删除*/ private String delFlag; + /**PAD路径*/ + private String padPath; private String tplinkPath; private String manuallyPicPath; private String manuallyMp4Path; diff --git a/nursing-unit-common/src/main/java/com/nu/entity/InvoicingOrdersEntity.java b/nursing-unit-common/src/main/java/com/nu/entity/InvoicingOrdersEntity.java index 3cfdf5ce..52d6af63 100644 --- a/nursing-unit-common/src/main/java/com/nu/entity/InvoicingOrdersEntity.java +++ b/nursing-unit-common/src/main/java/com/nu/entity/InvoicingOrdersEntity.java @@ -25,6 +25,8 @@ import java.util.Date; public class InvoicingOrdersEntity implements Serializable { /**id*/ private String id; + /**单号*/ + private String orderNo; /**数据池子表ID*/ private String poolId; /**主表id*/ @@ -113,7 +115,8 @@ public class InvoicingOrdersEntity implements Serializable { private Date updateTime; /**是否删除 0未删除 1删除*/ private String delFlag; - + /**PAD路径*/ + private String padPath; /**接单上限*/ private Integer orderCap; diff --git a/nursing-unit-services/nu-services-api/nu-services-local-api/src/main/java/com/nu/modules/invoicing/api/IInvoicingOrdersApi.java b/nursing-unit-services/nu-services-api/nu-services-local-api/src/main/java/com/nu/modules/invoicing/api/IInvoicingOrdersApi.java index 0963d784..7802dbd1 100644 --- a/nursing-unit-services/nu-services-api/nu-services-local-api/src/main/java/com/nu/modules/invoicing/api/IInvoicingOrdersApi.java +++ b/nursing-unit-services/nu-services-api/nu-services-local-api/src/main/java/com/nu/modules/invoicing/api/IInvoicingOrdersApi.java @@ -15,13 +15,13 @@ public interface IInvoicingOrdersApi { * 点击开始 * @param invoicingOrdersEntity */ - Result beginOrder(InvoicingOrdersEntity invoicingOrdersEntity); + void beginOrder(InvoicingOrdersEntity invoicingOrdersEntity); /** * 点击完成 * @param invoicingOrdersEntity */ - Result finishOrder(InvoicingOrdersEntity invoicingOrdersEntity); + void finishOrder(InvoicingOrdersEntity invoicingOrdersEntity); /** * 请领流程-获取指令工单信息 @@ -33,49 +33,49 @@ public interface IInvoicingOrdersApi { * 请领流程-请领申请 ql_sq * @param invoicingOrdersEntity */ - Result flowQlsq(InvoicingOrdersEntity invoicingOrdersEntity); + void flowQlsq(InvoicingOrdersEntity invoicingOrdersEntity); /** * 请领流程-重新请领申请 ql_sqr * @param invoicingOrdersEntity */ - Result flowQlsqR(InvoicingOrdersEntity invoicingOrdersEntity); + void flowQlsqR(InvoicingOrdersEntity invoicingOrdersEntity); /** * 请领流程-出库 ql_ck * @param invoicingOrdersEntity */ - Result flowQlck(InvoicingOrdersEntity invoicingOrdersEntity); + void flowQlck(InvoicingOrdersEntity invoicingOrdersEntity); /** * 请领流程-回退 ql_ht * @param invoicingOrdersEntity */ - Result flowQlht(InvoicingOrdersEntity invoicingOrdersEntity); + void flowQlht(InvoicingOrdersEntity invoicingOrdersEntity); /** * 请领流程-作废 ql_zf * @param invoicingOrdersEntity */ - Result flowQlzf(InvoicingOrdersEntity invoicingOrdersEntity); + void flowQlzf(InvoicingOrdersEntity invoicingOrdersEntity); /** * 请领流程-回退作废 ql_htzf * @param invoicingOrdersEntity */ - Result flowQlhtzf(InvoicingOrdersEntity invoicingOrdersEntity); + void flowQlhtzf(InvoicingOrdersEntity invoicingOrdersEntity); /** * 单元退货-单元申请 dyth_dysq 暂时无用,预留 * @param invoicingOrdersEntity */ - Result flowDythDysq(InvoicingOrdersEntity invoicingOrdersEntity); + void flowDythDysq(InvoicingOrdersEntity invoicingOrdersEntity); /** * 单元退货-仓库收货 dyth_cksh * @param invoicingOrdersEntity */ - Result flowDythCksh(InvoicingOrdersEntity invoicingOrdersEntity); + void flowDythCksh(InvoicingOrdersEntity invoicingOrdersEntity); /** * 单元退货-获取指令工单信息 @@ -87,25 +87,25 @@ public interface IInvoicingOrdersApi { * 单元退货-提交时修改业务单号 * @param invoicingOrdersEntity */ - Result updateDyThOrderBizId(InvoicingOrdersEntity invoicingOrdersEntity); + void updateDyThOrderBizId(InvoicingOrdersEntity invoicingOrdersEntity); /** * 单元退货-库管点击开始 * @param invoicingOrdersEntity */ - Result beginDyThOrder(InvoicingOrdersEntity invoicingOrdersEntity); + void beginDyThOrder(InvoicingOrdersEntity invoicingOrdersEntity); /** * 单元退货-库管点击完成 * @param invoicingOrdersEntity */ - Result finishDyThOrder(InvoicingOrdersEntity invoicingOrdersEntity); + void finishDyThOrder(InvoicingOrdersEntity invoicingOrdersEntity); /** * 流程中提交时修改业务单号 * @param invoicingOrdersEntity */ - Result updateOrderBizId(InvoicingOrdersEntity invoicingOrdersEntity); + void updateOrderBizId(InvoicingOrdersEntity invoicingOrdersEntity); } diff --git a/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/biz/care/order/entity/CareOrders.java b/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/biz/care/order/entity/CareOrders.java index d8ed1be8..210a1a35 100644 --- a/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/biz/care/order/entity/CareOrders.java +++ b/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/biz/care/order/entity/CareOrders.java @@ -32,6 +32,8 @@ public class CareOrders implements Serializable { /**id*/ @TableId(type = IdType.ASSIGN_ID) private String id; + /**单号*/ + private String orderNo; /**数据池子表ID*/ private String poolId; /**主表id*/ @@ -118,6 +120,8 @@ public class CareOrders implements Serializable { private Date updateTime; /**是否删除 0未删除 1删除*/ private String delFlag; + /**PAD路径*/ + private String padPath; /**接单上限*/ @TableField(exist = false) diff --git a/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/biz/care/order/service/impl/CareOrdersServiceImpl.java b/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/biz/care/order/service/impl/CareOrdersServiceImpl.java index eb7a5c20..89d98ca1 100644 --- a/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/biz/care/order/service/impl/CareOrdersServiceImpl.java +++ b/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/biz/care/order/service/impl/CareOrdersServiceImpl.java @@ -1,5 +1,6 @@ package com.nu.modules.biz.care.order.service.impl; +import com.alibaba.fastjson.JSONObject; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.nu.modules.biz.care.order.entity.CareOrders; @@ -7,14 +8,19 @@ import com.nu.modules.biz.care.order.entity.CareOrdersSub; import com.nu.modules.biz.care.order.mapper.CareOrdersMapper; import com.nu.modules.biz.care.order.service.ICareOrdersService; import com.nu.modules.biz.care.order.service.ICareOrdersSubService; +import com.nu.modules.biz.invoicing.order.entity.InvoicingOrders; import com.nu.modules.config.sendorderrule.entity.SendOrderRule; import com.nu.modules.config.sendorderrule.entity.SendOrderRuleSub; import com.nu.modules.config.sendorderrule.service.ISendOrderRuleService; import com.nu.modules.config.sendorderrule.service.ISendOrderRuleSubService; import lombok.extern.slf4j.Slf4j; import org.jeecg.common.api.vo.Result; +import org.jeecg.common.system.api.ISysBaseAPI; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; + +import java.time.LocalDate; +import java.time.format.DateTimeFormatter; import java.util.*; import java.util.stream.Collectors; @@ -30,11 +36,12 @@ public class CareOrdersServiceImpl extends ServiceImpl ruleSubList; @@ -114,6 +121,7 @@ public class CareOrdersServiceImpl extends ServiceImpl qw = new QueryWrapper<>(); + qw.likeRight("order_no", todayPrefix); + qw.select("order_no"); + qw.orderByDesc("order_no"); + qw.last("limt 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); + 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); + } } diff --git a/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/biz/invoicing/order/entity/InvoicingOrders.java b/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/biz/invoicing/order/entity/InvoicingOrders.java index 240db25b..1ab7c5c1 100644 --- a/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/biz/invoicing/order/entity/InvoicingOrders.java +++ b/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/biz/invoicing/order/entity/InvoicingOrders.java @@ -31,6 +31,8 @@ public class InvoicingOrders implements Serializable { /**id*/ @TableId(type = IdType.ASSIGN_ID) private String id; + /**单号*/ + private String orderNo; /**数据池子表ID*/ private String poolId; /**业务主表id,或者主表单号*/ @@ -127,6 +129,9 @@ public class InvoicingOrders implements Serializable { private String initiatorName; /**备注*/ private String remarks; + /**PAD路径*/ + private String padPath; + /**接单上限*/ @TableField(exist = false) private Integer orderCap; diff --git a/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/biz/invoicing/order/mapper/xml/InvoicingOrdersMapper.xml b/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/biz/invoicing/order/mapper/xml/InvoicingOrdersMapper.xml index 803cd443..fbbf2fbf 100644 --- a/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/biz/invoicing/order/mapper/xml/InvoicingOrdersMapper.xml +++ b/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/biz/invoicing/order/mapper/xml/InvoicingOrdersMapper.xml @@ -159,7 +159,8 @@ b.mp3_file as mp3File, b.mp4_file as mp4File, b.service_duration as serviceDuration, - b.service_content as serviceContent + b.service_content as serviceContent, + a.pad_path as padPath from nu_config_service_flow_sub a inner join nu_config_service_directive b on b.id = a.directive_id LEFT JOIN (select * from sys_dict_item where dict_id = '1900374791386140674') dict on b.cycle_type = dict.item_value @@ -186,11 +187,22 @@ b.mp3_file as mp3File, b.mp4_file as mp4File, b.service_duration as serviceDuration, - b.service_content as serviceContent + b.service_content as serviceContent, + a.pad_path as padPath from nu_config_service_flow_sub a inner join nu_config_service_directive b on b.id = a.directive_id LEFT JOIN (select * from sys_dict_item where dict_id = '1900374791386140674') dict on b.cycle_type = dict.item_value - where a.id = #{flowId} + + + AND a.id = #{flowId} + + + AND a.directive_id = #{directiveId} + + + AND a.flow_code = #{flowCode} + + @@ -293,7 +305,8 @@ a.initiator_id as initiatorId, a.initiator_name as initiatorName, a.remarks, - a.biz_type as flowCode + a.biz_type as flowCode, + a.pad_path as padPath from nu_biz_nu_invoicing_directive_order a diff --git a/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/biz/invoicing/order/service/impl/InvoicingOrdersServiceImpl.java b/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/biz/invoicing/order/service/impl/InvoicingOrdersServiceImpl.java index a89f7433..0289ef20 100644 --- a/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/biz/invoicing/order/service/impl/InvoicingOrdersServiceImpl.java +++ b/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/biz/invoicing/order/service/impl/InvoicingOrdersServiceImpl.java @@ -4,7 +4,6 @@ import com.alibaba.fastjson.JSONObject; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.nu.entity.InvoicingOrdersEntity; -import com.nu.modules.biz.care.datapool.entity.CareDataPoolSub; import com.nu.modules.biz.invoicing.order.entity.InvoicingOrders; import com.nu.modules.biz.invoicing.order.mapper.InvoicingOrdersMapper; import com.nu.modules.biz.invoicing.order.service.IEmpOrdersService; @@ -12,19 +11,16 @@ import com.nu.modules.biz.invoicing.order.service.IInvoicingOrdersService; import com.nu.modules.biz.invoicing.order.service.IQlOrdersService; import com.nu.modules.biz.invoicing.order.service.IThOrdersService; import com.nu.modules.invoicing.api.IInvoicingOrdersApi; -import com.nu.modules.config.sendorderrule.entity.SendOrderRule; -import com.nu.modules.config.sendorderrule.entity.SendOrderRuleSub; -import com.nu.modules.config.sendorderrule.service.ISendOrderRuleService; -import com.nu.modules.config.sendorderrule.service.ISendOrderRuleSubService; -import com.nu.modules.sysconfig.ISysConfigApi; import lombok.extern.slf4j.Slf4j; import org.jeecg.common.api.vo.Result; +import org.jeecg.common.system.api.ISysBaseAPI; import org.springframework.beans.BeanUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; +import java.time.LocalDate; +import java.time.format.DateTimeFormatter; import java.util.*; -import java.util.stream.Collectors; /** * @Description: 仓库类服务指令工单 @@ -42,6 +38,8 @@ public class InvoicingOrdersServiceImpl extends ServiceImpl beginOrder(InvoicingOrdersEntity invoicingOrdersEntity){ -// try { - Calendar c = Calendar.getInstance(); - InvoicingOrders entity = new InvoicingOrders(); - entity.setId(invoicingOrdersEntity.getId()); - entity.setBeginTime(c.getTime()); - entity.setIzStart("Y"); - entity.setUpdateEmp(invoicingOrdersEntity.getInitiatorId()); - entity.setUpdateTime(c.getTime()); - entity.setBizType(invoicingOrdersEntity.getFlowCode()); - baseMapper.updateById(entity); -// }catch (Exception e){ -// return Result.error("开始失败:"+e.getMessage()); -// } - return Result.ok("开始成功"); + public void beginOrder(InvoicingOrdersEntity invoicingOrdersEntity){ + Calendar c = Calendar.getInstance(); + InvoicingOrders entity = new InvoicingOrders(); + entity.setId(invoicingOrdersEntity.getId()); + entity.setBeginTime(c.getTime()); + entity.setIzStart("Y"); + entity.setUpdateEmp(invoicingOrdersEntity.getInitiatorId()); + entity.setUpdateTime(c.getTime()); + entity.setBizType(invoicingOrdersEntity.getFlowCode()); + baseMapper.updateById(entity); } /** @@ -103,27 +97,22 @@ public class InvoicingOrdersServiceImpl extends ServiceImpl finishOrder(InvoicingOrdersEntity invoicingOrdersEntity){ -// try { - Calendar c = Calendar.getInstance(); - QueryWrapper ioQw = new QueryWrapper<>(); - ioQw.eq("id", invoicingOrdersEntity.getId()); - InvoicingOrders order = this.getOne(ioQw); - InvoicingOrders DirectivePrice = baseMapper.getDirectivePrice(order.getDirectiveId());//获取服务指令价格 - InvoicingOrders entity = new InvoicingOrders(); - entity.setId(invoicingOrdersEntity.getId()); - entity.setFinishTime(c.getTime()); - entity.setIzFinish("Y"); - entity.setUpdateEmp(invoicingOrdersEntity.getInitiatorId()); - entity.setUpdateTime(c.getTime()); - entity.setBizType(invoicingOrdersEntity.getFlowCode()); - entity.setTollPrice(DirectivePrice.getTollPrice()); - entity.setComPrice(DirectivePrice.getComPrice()); - baseMapper.updateById(entity); -// }catch (Exception e){ -// return Result.error("完成失败:"+e.getMessage()); -// } - return Result.ok("完成成功"); + public void finishOrder(InvoicingOrdersEntity invoicingOrdersEntity){ + Calendar c = Calendar.getInstance(); + QueryWrapper ioQw = new QueryWrapper<>(); + ioQw.eq("id", invoicingOrdersEntity.getId()); + InvoicingOrders order = this.getOne(ioQw); + InvoicingOrders DirectivePrice = baseMapper.getDirectivePrice(order.getDirectiveId());//获取服务指令价格 + InvoicingOrders entity = new InvoicingOrders(); + entity.setId(invoicingOrdersEntity.getId()); + entity.setFinishTime(c.getTime()); + entity.setIzFinish("Y"); + entity.setUpdateEmp(invoicingOrdersEntity.getInitiatorId()); + entity.setUpdateTime(c.getTime()); + entity.setBizType(invoicingOrdersEntity.getFlowCode()); + entity.setTollPrice(DirectivePrice.getTollPrice()); + entity.setComPrice(DirectivePrice.getComPrice()); + baseMapper.updateById(entity); } /** @@ -162,19 +151,8 @@ public class InvoicingOrdersServiceImpl extends ServiceImpl flowQlsq(InvoicingOrdersEntity invoicingOrdersEntity) { -// String code = invoicingOrdersEntity.getFlowCode(); -// if(code!=null&&!code.equals("")&&code.equals("ql_sq")){ -// try{ - qlOrdersService.flowQlsq(invoicingOrdersEntity); -// }catch (Exception e){ -// return Result.error("请领申请失败:"+e.getMessage()); -// } -// }else { -// //返回错误信息 -// return Result.error("请领申请流程编码错误"); -// } - return Result.ok(); + public void flowQlsq(InvoicingOrdersEntity invoicingOrdersEntity) { + qlOrdersService.flowQlsq(invoicingOrdersEntity); } /** @@ -182,19 +160,8 @@ public class InvoicingOrdersServiceImpl extends ServiceImpl flowQlsqR(InvoicingOrdersEntity invoicingOrdersEntity) { -// String code = invoicingOrdersEntity.getFlowCode(); -// if (code != null && !code.equals("") && code.equals("ql_sqr")) { -// try { - qlOrdersService.flowQlsqR(invoicingOrdersEntity); -// }catch (Exception e){ -// return Result.error("请领重新申请失败:"+e.getMessage()); -// } -// } else { -// //返回错误信息 -// return Result.error("重新请领申请流程编码错误"); -// } - return Result.ok(); + public void flowQlsqR(InvoicingOrdersEntity invoicingOrdersEntity) { + qlOrdersService.flowQlsqR(invoicingOrdersEntity); } /** @@ -202,19 +169,8 @@ public class InvoicingOrdersServiceImpl extends ServiceImpl flowQlck(InvoicingOrdersEntity invoicingOrdersEntity) { -// String code = invoicingOrdersEntity.getFlowCode(); -// if(code!=null&&!code.equals("")&&code.equals("ql_ck")){ -// try { - qlOrdersService.flowQlck(invoicingOrdersEntity); -// }catch (Exception e){ -// return Result.error("请领出库失败:"+e.getMessage()); -// } -// }else { -// //返回错误信息 -// return Result.error("请领出库流程编码错误"); -// } - return Result.ok(); + public void flowQlck(InvoicingOrdersEntity invoicingOrdersEntity) { + qlOrdersService.flowQlck(invoicingOrdersEntity); } /** @@ -222,19 +178,8 @@ public class InvoicingOrdersServiceImpl extends ServiceImpl flowQlht(InvoicingOrdersEntity invoicingOrdersEntity) { -// String code = invoicingOrdersEntity.getFlowCode(); -// if(code!=null&&!code.equals("")&&code.equals("ql_ht")){ -// try { - qlOrdersService.flowQlht(invoicingOrdersEntity); -// }catch (Exception e){ -// return Result.error("请领回退失败:"+e.getMessage()); -// } -// }else { -// //返回错误信息 -// return Result.error("请领回退流程编码错误"); -// } - return Result.ok(); + public void flowQlht(InvoicingOrdersEntity invoicingOrdersEntity) { + qlOrdersService.flowQlht(invoicingOrdersEntity); } /** @@ -242,19 +187,8 @@ public class InvoicingOrdersServiceImpl extends ServiceImpl flowQlzf(InvoicingOrdersEntity invoicingOrdersEntity) { -// String code = invoicingOrdersEntity.getFlowCode(); -// if(code!=null&&!code.equals("")&&code.equals("ql_zf")){ -// try { - qlOrdersService.flowQlzf(invoicingOrdersEntity); -// }catch (Exception e){ -// return Result.error("请领作废失败:"+e.getMessage()); -// } -// }else { -// //返回错误信息 -// return Result.error("请领作废流程编码错误"); -// } - return Result.ok(); + public void flowQlzf(InvoicingOrdersEntity invoicingOrdersEntity) { + qlOrdersService.flowQlzf(invoicingOrdersEntity); } /** @@ -262,19 +196,8 @@ public class InvoicingOrdersServiceImpl extends ServiceImpl flowQlhtzf(InvoicingOrdersEntity invoicingOrdersEntity) { -// String code = invoicingOrdersEntity.getFlowCode(); -// if(code!=null&&!code.equals("")&&code.equals("ql_htzf")){ -// try{ - qlOrdersService.flowQlhtzf(invoicingOrdersEntity); -// }catch (Exception e){ -// return Result.error("请领回退作废失败:"+e.getMessage()); -// } -// }else { -// //返回错误信息 -// return Result.error("请领回退作废流程编码错误"); -// } - return Result.ok(); + public void flowQlhtzf(InvoicingOrdersEntity invoicingOrdersEntity) { + qlOrdersService.flowQlhtzf(invoicingOrdersEntity); } /** @@ -282,19 +205,8 @@ public class InvoicingOrdersServiceImpl extends ServiceImpl flowDythDysq(InvoicingOrdersEntity invoicingOrdersEntity) { -// String code = invoicingOrdersEntity.getFlowCode(); -// if(code!=null&&!code.equals("")&&code.equals("dyth_dysq")){ -// try{ - thOrdersService.flowDythDysq(invoicingOrdersEntity); -// }catch (Exception e){ -// return Result.error(e.getMessage()); -// } -// }else { -// //返回错误信息 -// return Result.error("单元退货申请流程编码错误"); -// } - return Result.ok(); + public void flowDythDysq(InvoicingOrdersEntity invoicingOrdersEntity) { + thOrdersService.flowDythDysq(invoicingOrdersEntity); } /** @@ -302,19 +214,8 @@ public class InvoicingOrdersServiceImpl extends ServiceImpl flowDythCksh(InvoicingOrdersEntity invoicingOrdersEntity) { -// String code = invoicingOrdersEntity.getFlowCode(); -// if(code!=null&&!code.equals("")&&code.equals("dyth_cksh")){ -// try{ - thOrdersService.flowDythCksh(invoicingOrdersEntity); -// }catch (Exception e){ -// return Result.error(e.getMessage()); -// } -// }else { -// //返回错误信息 -// return Result.error("单元退货收货流程编码错误"); -// } - return Result.ok(); + public void flowDythCksh(InvoicingOrdersEntity invoicingOrdersEntity) { + thOrdersService.flowDythCksh(invoicingOrdersEntity); } /** @@ -342,8 +243,7 @@ public class InvoicingOrdersServiceImpl extends ServiceImpl updateDyThOrderBizId(InvoicingOrdersEntity invoicingOrdersEntity){ - + public void updateDyThOrderBizId(InvoicingOrdersEntity invoicingOrdersEntity){ log.info("function:updateDyThOrderBizId"); log.info("PoolId:"+invoicingOrdersEntity.getPoolId()); log.info("BizId:"+invoicingOrdersEntity.getBizId()); @@ -379,7 +279,6 @@ public class InvoicingOrdersServiceImpl extends ServiceImpl beginDyThOrder(InvoicingOrdersEntity invoicingOrdersEntity){ -// try { + public void beginDyThOrder(InvoicingOrdersEntity invoicingOrdersEntity){ log.info("Id:"+invoicingOrdersEntity.getId()); log.info("UpdateBy:"+invoicingOrdersEntity.getInitiatorId()); Calendar c = Calendar.getInstance(); @@ -399,11 +297,6 @@ public class InvoicingOrdersServiceImpl extends ServiceImpl finishDyThOrder(InvoicingOrdersEntity invoicingOrdersEntity){ -// try { + public void finishDyThOrder(InvoicingOrdersEntity invoicingOrdersEntity){ log.info("Id:"+invoicingOrdersEntity.getId()); log.info("UpdateBy:"+invoicingOrdersEntity.getInitiatorId()); Calendar c = Calendar.getInstance(); @@ -429,15 +321,10 @@ public class InvoicingOrdersServiceImpl extends ServiceImpl updateOrderBizId(InvoicingOrdersEntity invoicingOrdersEntity){ + public void updateOrderBizId(InvoicingOrdersEntity invoicingOrdersEntity){ log.info("function:updateOrderBizId"); log.info("BizId:"+invoicingOrdersEntity.getBizId()); @@ -472,7 +359,49 @@ public class InvoicingOrdersServiceImpl extends ServiceImpl0){ + 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 qw = new QueryWrapper<>(); + qw.likeRight("order_no", todayPrefix); + qw.select("order_no"); + qw.orderByDesc("order_no"); + qw.last("limt 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); + } } diff --git a/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/biz/invoicing/order/service/impl/QlOrdersServiceImpl.java b/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/biz/invoicing/order/service/impl/QlOrdersServiceImpl.java index fa947fdf..ea814d10 100644 --- a/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/biz/invoicing/order/service/impl/QlOrdersServiceImpl.java +++ b/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/biz/invoicing/order/service/impl/QlOrdersServiceImpl.java @@ -17,9 +17,12 @@ import com.nu.modules.invoicing.api.IInvoicingOrdersApi; import com.nu.modules.sysconfig.ISysConfigApi; import lombok.extern.slf4j.Slf4j; import org.jeecg.common.api.vo.Result; +import org.jeecg.common.system.api.ISysBaseAPI; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; +import java.time.LocalDate; +import java.time.format.DateTimeFormatter; import java.util.*; import java.util.stream.Collectors; @@ -37,6 +40,8 @@ public class QlOrdersServiceImpl extends ServiceImpl0){ + 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 qw = new QueryWrapper<>(); + qw.likeRight("order_no", todayPrefix); + qw.select("order_no"); + qw.orderByDesc("order_no"); + qw.last("limt 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); + } + /** * 获取管理平台静态资源路径 * diff --git a/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/biz/invoicing/order/service/impl/ThOrdersServiceImpl.java b/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/biz/invoicing/order/service/impl/ThOrdersServiceImpl.java index 6908a9fa..31bb1946 100644 --- a/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/biz/invoicing/order/service/impl/ThOrdersServiceImpl.java +++ b/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/biz/invoicing/order/service/impl/ThOrdersServiceImpl.java @@ -12,9 +12,12 @@ import com.nu.modules.biz.invoicing.order.service.IQlOrdersService; import com.nu.modules.biz.invoicing.order.service.IThOrdersService; import com.nu.modules.sysconfig.ISysConfigApi; import lombok.extern.slf4j.Slf4j; +import org.jeecg.common.system.api.ISysBaseAPI; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; +import java.time.LocalDate; +import java.time.format.DateTimeFormatter; import java.util.Calendar; import java.util.List; @@ -32,6 +35,8 @@ public class ThOrdersServiceImpl extends ServiceImpl0){ + 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 qw = new QueryWrapper<>(); + qw.likeRight("order_no", todayPrefix); + qw.select("order_no"); + qw.orderByDesc("order_no"); + qw.last("limt 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); + } + /** * 获取管理平台静态资源路径 * diff --git a/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/config/flow/entity/ServiceFlowSub.java b/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/config/flow/entity/ServiceFlowSub.java index aad7c2ec..b761f772 100644 --- a/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/config/flow/entity/ServiceFlowSub.java +++ b/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/config/flow/entity/ServiceFlowSub.java @@ -87,4 +87,7 @@ public class ServiceFlowSub implements Serializable { @ApiModelProperty(value = "是否删除 0未删除 1删除") @TableLogic private java.lang.String delFlag; + /**PAD路径*/ + @ApiModelProperty(value = "PAD路径") + private java.lang.String padPath; }