服务指令-工单增加单号字段,增加pad路径字段
This commit is contained in:
parent
be7f0052b7
commit
6f5a08663a
|
|
@ -25,6 +25,8 @@ public class CareOrdersSubEntity implements Serializable {
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
/**id*/
|
/**id*/
|
||||||
private String id;
|
private String id;
|
||||||
|
/**单号*/
|
||||||
|
private String orderNo;
|
||||||
/**主表id*/
|
/**主表id*/
|
||||||
private String mainId;
|
private String mainId;
|
||||||
/**数据池子表ID*/
|
/**数据池子表ID*/
|
||||||
|
|
@ -129,6 +131,8 @@ public class CareOrdersSubEntity implements Serializable {
|
||||||
private Date updateTime;
|
private Date updateTime;
|
||||||
/**是否删除 0未删除 1删除*/
|
/**是否删除 0未删除 1删除*/
|
||||||
private String delFlag;
|
private String delFlag;
|
||||||
|
/**PAD路径*/
|
||||||
|
private String padPath;
|
||||||
private String tplinkPath;
|
private String tplinkPath;
|
||||||
private String manuallyPicPath;
|
private String manuallyPicPath;
|
||||||
private String manuallyMp4Path;
|
private String manuallyMp4Path;
|
||||||
|
|
|
||||||
|
|
@ -25,6 +25,8 @@ import java.util.Date;
|
||||||
public class InvoicingOrdersEntity implements Serializable {
|
public class InvoicingOrdersEntity implements Serializable {
|
||||||
/**id*/
|
/**id*/
|
||||||
private String id;
|
private String id;
|
||||||
|
/**单号*/
|
||||||
|
private String orderNo;
|
||||||
/**数据池子表ID*/
|
/**数据池子表ID*/
|
||||||
private String poolId;
|
private String poolId;
|
||||||
/**主表id*/
|
/**主表id*/
|
||||||
|
|
@ -113,7 +115,8 @@ public class InvoicingOrdersEntity implements Serializable {
|
||||||
private Date updateTime;
|
private Date updateTime;
|
||||||
/**是否删除 0未删除 1删除*/
|
/**是否删除 0未删除 1删除*/
|
||||||
private String delFlag;
|
private String delFlag;
|
||||||
|
/**PAD路径*/
|
||||||
|
private String padPath;
|
||||||
/**接单上限*/
|
/**接单上限*/
|
||||||
private Integer orderCap;
|
private Integer orderCap;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -15,13 +15,13 @@ public interface IInvoicingOrdersApi {
|
||||||
* 点击开始
|
* 点击开始
|
||||||
* @param invoicingOrdersEntity
|
* @param invoicingOrdersEntity
|
||||||
*/
|
*/
|
||||||
Result<String> beginOrder(InvoicingOrdersEntity invoicingOrdersEntity);
|
void beginOrder(InvoicingOrdersEntity invoicingOrdersEntity);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 点击完成
|
* 点击完成
|
||||||
* @param invoicingOrdersEntity
|
* @param invoicingOrdersEntity
|
||||||
*/
|
*/
|
||||||
Result<String> finishOrder(InvoicingOrdersEntity invoicingOrdersEntity);
|
void finishOrder(InvoicingOrdersEntity invoicingOrdersEntity);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 请领流程-获取指令工单信息
|
* 请领流程-获取指令工单信息
|
||||||
|
|
@ -33,49 +33,49 @@ public interface IInvoicingOrdersApi {
|
||||||
* 请领流程-请领申请 ql_sq
|
* 请领流程-请领申请 ql_sq
|
||||||
* @param invoicingOrdersEntity
|
* @param invoicingOrdersEntity
|
||||||
*/
|
*/
|
||||||
Result<String> flowQlsq(InvoicingOrdersEntity invoicingOrdersEntity);
|
void flowQlsq(InvoicingOrdersEntity invoicingOrdersEntity);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 请领流程-重新请领申请 ql_sqr
|
* 请领流程-重新请领申请 ql_sqr
|
||||||
* @param invoicingOrdersEntity
|
* @param invoicingOrdersEntity
|
||||||
*/
|
*/
|
||||||
Result<String> flowQlsqR(InvoicingOrdersEntity invoicingOrdersEntity);
|
void flowQlsqR(InvoicingOrdersEntity invoicingOrdersEntity);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 请领流程-出库 ql_ck
|
* 请领流程-出库 ql_ck
|
||||||
* @param invoicingOrdersEntity
|
* @param invoicingOrdersEntity
|
||||||
*/
|
*/
|
||||||
Result<String> flowQlck(InvoicingOrdersEntity invoicingOrdersEntity);
|
void flowQlck(InvoicingOrdersEntity invoicingOrdersEntity);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 请领流程-回退 ql_ht
|
* 请领流程-回退 ql_ht
|
||||||
* @param invoicingOrdersEntity
|
* @param invoicingOrdersEntity
|
||||||
*/
|
*/
|
||||||
Result<String> flowQlht(InvoicingOrdersEntity invoicingOrdersEntity);
|
void flowQlht(InvoicingOrdersEntity invoicingOrdersEntity);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 请领流程-作废 ql_zf
|
* 请领流程-作废 ql_zf
|
||||||
* @param invoicingOrdersEntity
|
* @param invoicingOrdersEntity
|
||||||
*/
|
*/
|
||||||
Result<String> flowQlzf(InvoicingOrdersEntity invoicingOrdersEntity);
|
void flowQlzf(InvoicingOrdersEntity invoicingOrdersEntity);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 请领流程-回退作废 ql_htzf
|
* 请领流程-回退作废 ql_htzf
|
||||||
* @param invoicingOrdersEntity
|
* @param invoicingOrdersEntity
|
||||||
*/
|
*/
|
||||||
Result<String> flowQlhtzf(InvoicingOrdersEntity invoicingOrdersEntity);
|
void flowQlhtzf(InvoicingOrdersEntity invoicingOrdersEntity);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 单元退货-单元申请 dyth_dysq 暂时无用,预留
|
* 单元退货-单元申请 dyth_dysq 暂时无用,预留
|
||||||
* @param invoicingOrdersEntity
|
* @param invoicingOrdersEntity
|
||||||
*/
|
*/
|
||||||
Result<String> flowDythDysq(InvoicingOrdersEntity invoicingOrdersEntity);
|
void flowDythDysq(InvoicingOrdersEntity invoicingOrdersEntity);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 单元退货-仓库收货 dyth_cksh
|
* 单元退货-仓库收货 dyth_cksh
|
||||||
* @param invoicingOrdersEntity
|
* @param invoicingOrdersEntity
|
||||||
*/
|
*/
|
||||||
Result<String> flowDythCksh(InvoicingOrdersEntity invoicingOrdersEntity);
|
void flowDythCksh(InvoicingOrdersEntity invoicingOrdersEntity);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 单元退货-获取指令工单信息
|
* 单元退货-获取指令工单信息
|
||||||
|
|
@ -87,25 +87,25 @@ public interface IInvoicingOrdersApi {
|
||||||
* 单元退货-提交时修改业务单号
|
* 单元退货-提交时修改业务单号
|
||||||
* @param invoicingOrdersEntity
|
* @param invoicingOrdersEntity
|
||||||
*/
|
*/
|
||||||
Result<String> updateDyThOrderBizId(InvoicingOrdersEntity invoicingOrdersEntity);
|
void updateDyThOrderBizId(InvoicingOrdersEntity invoicingOrdersEntity);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 单元退货-库管点击开始
|
* 单元退货-库管点击开始
|
||||||
* @param invoicingOrdersEntity
|
* @param invoicingOrdersEntity
|
||||||
*/
|
*/
|
||||||
Result<String> beginDyThOrder(InvoicingOrdersEntity invoicingOrdersEntity);
|
void beginDyThOrder(InvoicingOrdersEntity invoicingOrdersEntity);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 单元退货-库管点击完成
|
* 单元退货-库管点击完成
|
||||||
* @param invoicingOrdersEntity
|
* @param invoicingOrdersEntity
|
||||||
*/
|
*/
|
||||||
Result<String> finishDyThOrder(InvoicingOrdersEntity invoicingOrdersEntity);
|
void finishDyThOrder(InvoicingOrdersEntity invoicingOrdersEntity);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 流程中提交时修改业务单号
|
* 流程中提交时修改业务单号
|
||||||
* @param invoicingOrdersEntity
|
* @param invoicingOrdersEntity
|
||||||
*/
|
*/
|
||||||
Result<String> updateOrderBizId(InvoicingOrdersEntity invoicingOrdersEntity);
|
void updateOrderBizId(InvoicingOrdersEntity invoicingOrdersEntity);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -32,6 +32,8 @@ public class CareOrders implements Serializable {
|
||||||
/**id*/
|
/**id*/
|
||||||
@TableId(type = IdType.ASSIGN_ID)
|
@TableId(type = IdType.ASSIGN_ID)
|
||||||
private String id;
|
private String id;
|
||||||
|
/**单号*/
|
||||||
|
private String orderNo;
|
||||||
/**数据池子表ID*/
|
/**数据池子表ID*/
|
||||||
private String poolId;
|
private String poolId;
|
||||||
/**主表id*/
|
/**主表id*/
|
||||||
|
|
@ -118,6 +120,8 @@ public class CareOrders implements Serializable {
|
||||||
private Date updateTime;
|
private Date updateTime;
|
||||||
/**是否删除 0未删除 1删除*/
|
/**是否删除 0未删除 1删除*/
|
||||||
private String delFlag;
|
private String delFlag;
|
||||||
|
/**PAD路径*/
|
||||||
|
private String padPath;
|
||||||
|
|
||||||
/**接单上限*/
|
/**接单上限*/
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
package com.nu.modules.biz.care.order.service.impl;
|
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.core.conditions.query.QueryWrapper;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import com.nu.modules.biz.care.order.entity.CareOrders;
|
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.mapper.CareOrdersMapper;
|
||||||
import com.nu.modules.biz.care.order.service.ICareOrdersService;
|
import com.nu.modules.biz.care.order.service.ICareOrdersService;
|
||||||
import com.nu.modules.biz.care.order.service.ICareOrdersSubService;
|
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.SendOrderRule;
|
||||||
import com.nu.modules.config.sendorderrule.entity.SendOrderRuleSub;
|
import com.nu.modules.config.sendorderrule.entity.SendOrderRuleSub;
|
||||||
import com.nu.modules.config.sendorderrule.service.ISendOrderRuleService;
|
import com.nu.modules.config.sendorderrule.service.ISendOrderRuleService;
|
||||||
import com.nu.modules.config.sendorderrule.service.ISendOrderRuleSubService;
|
import com.nu.modules.config.sendorderrule.service.ISendOrderRuleSubService;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.jeecg.common.api.vo.Result;
|
import org.jeecg.common.api.vo.Result;
|
||||||
|
import org.jeecg.common.system.api.ISysBaseAPI;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.time.LocalDate;
|
||||||
|
import java.time.format.DateTimeFormatter;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
|
@ -30,11 +36,12 @@ public class CareOrdersServiceImpl extends ServiceImpl<CareOrdersMapper, CareOrd
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
ICareOrdersSubService ordersSubService;
|
ICareOrdersSubService ordersSubService;
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
ISendOrderRuleService sendOrderRuleService;
|
ISendOrderRuleService sendOrderRuleService;
|
||||||
@Autowired
|
@Autowired
|
||||||
ISendOrderRuleSubService sendOrderRuleSubService;
|
ISendOrderRuleSubService sendOrderRuleSubService;
|
||||||
|
@Autowired
|
||||||
|
private ISysBaseAPI sysBaseAPI;
|
||||||
SendOrderRule sendOrderRule;
|
SendOrderRule sendOrderRule;
|
||||||
List<SendOrderRuleSub> ruleSubList;
|
List<SendOrderRuleSub> ruleSubList;
|
||||||
|
|
||||||
|
|
@ -114,6 +121,7 @@ public class CareOrdersServiceImpl extends ServiceImpl<CareOrdersMapper, CareOrd
|
||||||
//获取满足条件的员工
|
//获取满足条件的员工
|
||||||
CareOrders employee = employeeScreening(directiveIds,orders.getElderId(),null,orders.getStartTime());
|
CareOrders employee = employeeScreening(directiveIds,orders.getElderId(),null,orders.getStartTime());
|
||||||
if(employee!=null){
|
if(employee!=null){
|
||||||
|
getOrderNo(orders);
|
||||||
orders.setEmployeeId(employee.getEmployeeId());
|
orders.setEmployeeId(employee.getEmployeeId());
|
||||||
orders.setEmployeeName(employee.getEmployeeName());
|
orders.setEmployeeName(employee.getEmployeeName());
|
||||||
orders.setIzStart("N");
|
orders.setIzStart("N");
|
||||||
|
|
@ -140,6 +148,7 @@ public class CareOrdersServiceImpl extends ServiceImpl<CareOrdersMapper, CareOrd
|
||||||
String employeeIds = emps.stream().map(CareOrders::getEmployeeId).collect(Collectors.joining(","));
|
String employeeIds = emps.stream().map(CareOrders::getEmployeeId).collect(Collectors.joining(","));
|
||||||
CareOrders employee = employeeScreening(directiveIds,orders.getElderId(),employeeIds,orders.getStartTime());
|
CareOrders employee = employeeScreening(directiveIds,orders.getElderId(),employeeIds,orders.getStartTime());
|
||||||
if(employee!=null){
|
if(employee!=null){
|
||||||
|
getOrderNo(orders);
|
||||||
orders.setEmployeeId(employee.getEmployeeId());
|
orders.setEmployeeId(employee.getEmployeeId());
|
||||||
orders.setEmployeeName(employee.getEmployeeName());
|
orders.setEmployeeName(employee.getEmployeeName());
|
||||||
orders.setIzStart("N");
|
orders.setIzStart("N");
|
||||||
|
|
@ -503,4 +512,39 @@ public class CareOrdersServiceImpl extends ServiceImpl<CareOrdersMapper, CareOrd
|
||||||
System.out.println("获取指定护理员工信息:"+emp.getEmployeeId()+"-"+emp.getEmployeeName());
|
System.out.println("获取指定护理员工信息:"+emp.getEmployeeId()+"-"+emp.getEmployeeName());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取单号
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
private void getOrderNo(CareOrders orders){
|
||||||
|
JSONObject deptInfo = sysBaseAPI.getDeptInfo();
|
||||||
|
String deptCode = deptInfo.getString("code");
|
||||||
|
String today = LocalDate.now().format(DateTimeFormatter.ofPattern("yyyyMMdd"));
|
||||||
|
// 构建今天的前缀模式
|
||||||
|
String todayPrefix = "HL" + deptCode + today;
|
||||||
|
QueryWrapper<CareOrders> 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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -31,6 +31,8 @@ public class InvoicingOrders implements Serializable {
|
||||||
/**id*/
|
/**id*/
|
||||||
@TableId(type = IdType.ASSIGN_ID)
|
@TableId(type = IdType.ASSIGN_ID)
|
||||||
private String id;
|
private String id;
|
||||||
|
/**单号*/
|
||||||
|
private String orderNo;
|
||||||
/**数据池子表ID*/
|
/**数据池子表ID*/
|
||||||
private String poolId;
|
private String poolId;
|
||||||
/**业务主表id,或者主表单号*/
|
/**业务主表id,或者主表单号*/
|
||||||
|
|
@ -127,6 +129,9 @@ public class InvoicingOrders implements Serializable {
|
||||||
private String initiatorName;
|
private String initiatorName;
|
||||||
/**备注*/
|
/**备注*/
|
||||||
private String remarks;
|
private String remarks;
|
||||||
|
/**PAD路径*/
|
||||||
|
private String padPath;
|
||||||
|
|
||||||
/**接单上限*/
|
/**接单上限*/
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
private Integer orderCap;
|
private Integer orderCap;
|
||||||
|
|
|
||||||
|
|
@ -159,7 +159,8 @@
|
||||||
b.mp3_file as mp3File,
|
b.mp3_file as mp3File,
|
||||||
b.mp4_file as mp4File,
|
b.mp4_file as mp4File,
|
||||||
b.service_duration as serviceDuration,
|
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
|
from nu_config_service_flow_sub a
|
||||||
inner join nu_config_service_directive b on b.id = a.directive_id
|
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
|
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.mp3_file as mp3File,
|
||||||
b.mp4_file as mp4File,
|
b.mp4_file as mp4File,
|
||||||
b.service_duration as serviceDuration,
|
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
|
from nu_config_service_flow_sub a
|
||||||
inner join nu_config_service_directive b on b.id = a.directive_id
|
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
|
LEFT JOIN (select * from sys_dict_item where dict_id = '1900374791386140674') dict on b.cycle_type = dict.item_value
|
||||||
where a.id = #{flowId}
|
<where>
|
||||||
|
<if test="flowId != null and flowId != ''">
|
||||||
|
AND a.id = #{flowId}
|
||||||
|
</if>
|
||||||
|
<if test="directiveId != null and directiveId != ''">
|
||||||
|
AND a.directive_id = #{directiveId}
|
||||||
|
</if>
|
||||||
|
<if test="flowCode != null and flowCode != ''">
|
||||||
|
AND a.flow_code = #{flowCode}
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<update id="updateOrder">
|
<update id="updateOrder">
|
||||||
|
|
@ -293,7 +305,8 @@
|
||||||
a.initiator_id as initiatorId,
|
a.initiator_id as initiatorId,
|
||||||
a.initiator_name as initiatorName,
|
a.initiator_name as initiatorName,
|
||||||
a.remarks,
|
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
|
from nu_biz_nu_invoicing_directive_order a
|
||||||
<where>
|
<where>
|
||||||
<if test="delFlag != null and delFlag != ''">
|
<if test="delFlag != null and delFlag != ''">
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,6 @@ import com.alibaba.fastjson.JSONObject;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import com.nu.entity.InvoicingOrdersEntity;
|
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.entity.InvoicingOrders;
|
||||||
import com.nu.modules.biz.invoicing.order.mapper.InvoicingOrdersMapper;
|
import com.nu.modules.biz.invoicing.order.mapper.InvoicingOrdersMapper;
|
||||||
import com.nu.modules.biz.invoicing.order.service.IEmpOrdersService;
|
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.IQlOrdersService;
|
||||||
import com.nu.modules.biz.invoicing.order.service.IThOrdersService;
|
import com.nu.modules.biz.invoicing.order.service.IThOrdersService;
|
||||||
import com.nu.modules.invoicing.api.IInvoicingOrdersApi;
|
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 lombok.extern.slf4j.Slf4j;
|
||||||
import org.jeecg.common.api.vo.Result;
|
import org.jeecg.common.api.vo.Result;
|
||||||
|
import org.jeecg.common.system.api.ISysBaseAPI;
|
||||||
import org.springframework.beans.BeanUtils;
|
import org.springframework.beans.BeanUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.time.LocalDate;
|
||||||
|
import java.time.format.DateTimeFormatter;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.stream.Collectors;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Description: 仓库类服务指令工单
|
* @Description: 仓库类服务指令工单
|
||||||
|
|
@ -42,6 +38,8 @@ public class InvoicingOrdersServiceImpl extends ServiceImpl<InvoicingOrdersMappe
|
||||||
IThOrdersService thOrdersService;
|
IThOrdersService thOrdersService;
|
||||||
@Autowired
|
@Autowired
|
||||||
IEmpOrdersService empOrdersService;
|
IEmpOrdersService empOrdersService;
|
||||||
|
@Autowired
|
||||||
|
private ISysBaseAPI sysBaseAPI;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 指令池批量生成工单-定时调用
|
* 指令池批量生成工单-定时调用
|
||||||
|
|
@ -67,6 +65,7 @@ public class InvoicingOrdersServiceImpl extends ServiceImpl<InvoicingOrdersMappe
|
||||||
//获取满足条件的员工
|
//获取满足条件的员工
|
||||||
InvoicingOrders employee = empOrdersService.employeeScreening(orders.getDirectiveId(), orders.getElderId(), orders.getStartTime());
|
InvoicingOrders employee = empOrdersService.employeeScreening(orders.getDirectiveId(), orders.getElderId(), orders.getStartTime());
|
||||||
if (employee != null) {
|
if (employee != null) {
|
||||||
|
getOrderNo(orders);
|
||||||
orders.setEmployeeId(employee.getEmployeeId());
|
orders.setEmployeeId(employee.getEmployeeId());
|
||||||
orders.setEmployeeName(employee.getEmployeeName());
|
orders.setEmployeeName(employee.getEmployeeName());
|
||||||
orders.setIzStart("N");
|
orders.setIzStart("N");
|
||||||
|
|
@ -81,21 +80,16 @@ public class InvoicingOrdersServiceImpl extends ServiceImpl<InvoicingOrdersMappe
|
||||||
* @param invoicingOrdersEntity
|
* @param invoicingOrdersEntity
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public Result<String> beginOrder(InvoicingOrdersEntity invoicingOrdersEntity){
|
public void beginOrder(InvoicingOrdersEntity invoicingOrdersEntity){
|
||||||
// try {
|
Calendar c = Calendar.getInstance();
|
||||||
Calendar c = Calendar.getInstance();
|
InvoicingOrders entity = new InvoicingOrders();
|
||||||
InvoicingOrders entity = new InvoicingOrders();
|
entity.setId(invoicingOrdersEntity.getId());
|
||||||
entity.setId(invoicingOrdersEntity.getId());
|
entity.setBeginTime(c.getTime());
|
||||||
entity.setBeginTime(c.getTime());
|
entity.setIzStart("Y");
|
||||||
entity.setIzStart("Y");
|
entity.setUpdateEmp(invoicingOrdersEntity.getInitiatorId());
|
||||||
entity.setUpdateEmp(invoicingOrdersEntity.getInitiatorId());
|
entity.setUpdateTime(c.getTime());
|
||||||
entity.setUpdateTime(c.getTime());
|
entity.setBizType(invoicingOrdersEntity.getFlowCode());
|
||||||
entity.setBizType(invoicingOrdersEntity.getFlowCode());
|
baseMapper.updateById(entity);
|
||||||
baseMapper.updateById(entity);
|
|
||||||
// }catch (Exception e){
|
|
||||||
// return Result.error("开始失败:"+e.getMessage());
|
|
||||||
// }
|
|
||||||
return Result.ok("开始成功");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -103,27 +97,22 @@ public class InvoicingOrdersServiceImpl extends ServiceImpl<InvoicingOrdersMappe
|
||||||
* @param invoicingOrdersEntity
|
* @param invoicingOrdersEntity
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public Result<String> finishOrder(InvoicingOrdersEntity invoicingOrdersEntity){
|
public void finishOrder(InvoicingOrdersEntity invoicingOrdersEntity){
|
||||||
// try {
|
Calendar c = Calendar.getInstance();
|
||||||
Calendar c = Calendar.getInstance();
|
QueryWrapper<InvoicingOrders> ioQw = new QueryWrapper<>();
|
||||||
QueryWrapper<InvoicingOrders> ioQw = new QueryWrapper<>();
|
ioQw.eq("id", invoicingOrdersEntity.getId());
|
||||||
ioQw.eq("id", invoicingOrdersEntity.getId());
|
InvoicingOrders order = this.getOne(ioQw);
|
||||||
InvoicingOrders order = this.getOne(ioQw);
|
InvoicingOrders DirectivePrice = baseMapper.getDirectivePrice(order.getDirectiveId());//获取服务指令价格
|
||||||
InvoicingOrders DirectivePrice = baseMapper.getDirectivePrice(order.getDirectiveId());//获取服务指令价格
|
InvoicingOrders entity = new InvoicingOrders();
|
||||||
InvoicingOrders entity = new InvoicingOrders();
|
entity.setId(invoicingOrdersEntity.getId());
|
||||||
entity.setId(invoicingOrdersEntity.getId());
|
entity.setFinishTime(c.getTime());
|
||||||
entity.setFinishTime(c.getTime());
|
entity.setIzFinish("Y");
|
||||||
entity.setIzFinish("Y");
|
entity.setUpdateEmp(invoicingOrdersEntity.getInitiatorId());
|
||||||
entity.setUpdateEmp(invoicingOrdersEntity.getInitiatorId());
|
entity.setUpdateTime(c.getTime());
|
||||||
entity.setUpdateTime(c.getTime());
|
entity.setBizType(invoicingOrdersEntity.getFlowCode());
|
||||||
entity.setBizType(invoicingOrdersEntity.getFlowCode());
|
entity.setTollPrice(DirectivePrice.getTollPrice());
|
||||||
entity.setTollPrice(DirectivePrice.getTollPrice());
|
entity.setComPrice(DirectivePrice.getComPrice());
|
||||||
entity.setComPrice(DirectivePrice.getComPrice());
|
baseMapper.updateById(entity);
|
||||||
baseMapper.updateById(entity);
|
|
||||||
// }catch (Exception e){
|
|
||||||
// return Result.error("完成失败:"+e.getMessage());
|
|
||||||
// }
|
|
||||||
return Result.ok("完成成功");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -162,19 +151,8 @@ public class InvoicingOrdersServiceImpl extends ServiceImpl<InvoicingOrdersMappe
|
||||||
* @param invoicingOrdersEntity
|
* @param invoicingOrdersEntity
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public Result<String> flowQlsq(InvoicingOrdersEntity invoicingOrdersEntity) {
|
public void flowQlsq(InvoicingOrdersEntity invoicingOrdersEntity) {
|
||||||
// String code = invoicingOrdersEntity.getFlowCode();
|
qlOrdersService.flowQlsq(invoicingOrdersEntity);
|
||||||
// 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();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -182,19 +160,8 @@ public class InvoicingOrdersServiceImpl extends ServiceImpl<InvoicingOrdersMappe
|
||||||
* @param invoicingOrdersEntity
|
* @param invoicingOrdersEntity
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public Result<String> flowQlsqR(InvoicingOrdersEntity invoicingOrdersEntity) {
|
public void flowQlsqR(InvoicingOrdersEntity invoicingOrdersEntity) {
|
||||||
// String code = invoicingOrdersEntity.getFlowCode();
|
qlOrdersService.flowQlsqR(invoicingOrdersEntity);
|
||||||
// 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();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -202,19 +169,8 @@ public class InvoicingOrdersServiceImpl extends ServiceImpl<InvoicingOrdersMappe
|
||||||
* @param invoicingOrdersEntity
|
* @param invoicingOrdersEntity
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public Result<String> flowQlck(InvoicingOrdersEntity invoicingOrdersEntity) {
|
public void flowQlck(InvoicingOrdersEntity invoicingOrdersEntity) {
|
||||||
// String code = invoicingOrdersEntity.getFlowCode();
|
qlOrdersService.flowQlck(invoicingOrdersEntity);
|
||||||
// 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();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -222,19 +178,8 @@ public class InvoicingOrdersServiceImpl extends ServiceImpl<InvoicingOrdersMappe
|
||||||
* @param invoicingOrdersEntity
|
* @param invoicingOrdersEntity
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public Result<String> flowQlht(InvoicingOrdersEntity invoicingOrdersEntity) {
|
public void flowQlht(InvoicingOrdersEntity invoicingOrdersEntity) {
|
||||||
// String code = invoicingOrdersEntity.getFlowCode();
|
qlOrdersService.flowQlht(invoicingOrdersEntity);
|
||||||
// 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();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -242,19 +187,8 @@ public class InvoicingOrdersServiceImpl extends ServiceImpl<InvoicingOrdersMappe
|
||||||
* @param invoicingOrdersEntity
|
* @param invoicingOrdersEntity
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public Result<String> flowQlzf(InvoicingOrdersEntity invoicingOrdersEntity) {
|
public void flowQlzf(InvoicingOrdersEntity invoicingOrdersEntity) {
|
||||||
// String code = invoicingOrdersEntity.getFlowCode();
|
qlOrdersService.flowQlzf(invoicingOrdersEntity);
|
||||||
// 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();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -262,19 +196,8 @@ public class InvoicingOrdersServiceImpl extends ServiceImpl<InvoicingOrdersMappe
|
||||||
* @param invoicingOrdersEntity
|
* @param invoicingOrdersEntity
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public Result<String> flowQlhtzf(InvoicingOrdersEntity invoicingOrdersEntity) {
|
public void flowQlhtzf(InvoicingOrdersEntity invoicingOrdersEntity) {
|
||||||
// String code = invoicingOrdersEntity.getFlowCode();
|
qlOrdersService.flowQlhtzf(invoicingOrdersEntity);
|
||||||
// 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();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -282,19 +205,8 @@ public class InvoicingOrdersServiceImpl extends ServiceImpl<InvoicingOrdersMappe
|
||||||
* @param invoicingOrdersEntity
|
* @param invoicingOrdersEntity
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public Result<String> flowDythDysq(InvoicingOrdersEntity invoicingOrdersEntity) {
|
public void flowDythDysq(InvoicingOrdersEntity invoicingOrdersEntity) {
|
||||||
// String code = invoicingOrdersEntity.getFlowCode();
|
thOrdersService.flowDythDysq(invoicingOrdersEntity);
|
||||||
// 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();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -302,19 +214,8 @@ public class InvoicingOrdersServiceImpl extends ServiceImpl<InvoicingOrdersMappe
|
||||||
* @param invoicingOrdersEntity
|
* @param invoicingOrdersEntity
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public Result<String> flowDythCksh(InvoicingOrdersEntity invoicingOrdersEntity) {
|
public void flowDythCksh(InvoicingOrdersEntity invoicingOrdersEntity) {
|
||||||
// String code = invoicingOrdersEntity.getFlowCode();
|
thOrdersService.flowDythCksh(invoicingOrdersEntity);
|
||||||
// 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();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -342,8 +243,7 @@ public class InvoicingOrdersServiceImpl extends ServiceImpl<InvoicingOrdersMappe
|
||||||
* @param invoicingOrdersEntity
|
* @param invoicingOrdersEntity
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public Result<String> updateDyThOrderBizId(InvoicingOrdersEntity invoicingOrdersEntity){
|
public void updateDyThOrderBizId(InvoicingOrdersEntity invoicingOrdersEntity){
|
||||||
|
|
||||||
log.info("function:updateDyThOrderBizId");
|
log.info("function:updateDyThOrderBizId");
|
||||||
log.info("PoolId:"+invoicingOrdersEntity.getPoolId());
|
log.info("PoolId:"+invoicingOrdersEntity.getPoolId());
|
||||||
log.info("BizId:"+invoicingOrdersEntity.getBizId());
|
log.info("BizId:"+invoicingOrdersEntity.getBizId());
|
||||||
|
|
@ -379,7 +279,6 @@ public class InvoicingOrdersServiceImpl extends ServiceImpl<InvoicingOrdersMappe
|
||||||
baseMapper.updateById(entity);
|
baseMapper.updateById(entity);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return Result.ok("修改业务单号成功");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -387,8 +286,7 @@ public class InvoicingOrdersServiceImpl extends ServiceImpl<InvoicingOrdersMappe
|
||||||
* @param invoicingOrdersEntity
|
* @param invoicingOrdersEntity
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public Result<String> beginDyThOrder(InvoicingOrdersEntity invoicingOrdersEntity){
|
public void beginDyThOrder(InvoicingOrdersEntity invoicingOrdersEntity){
|
||||||
// try {
|
|
||||||
log.info("Id:"+invoicingOrdersEntity.getId());
|
log.info("Id:"+invoicingOrdersEntity.getId());
|
||||||
log.info("UpdateBy:"+invoicingOrdersEntity.getInitiatorId());
|
log.info("UpdateBy:"+invoicingOrdersEntity.getInitiatorId());
|
||||||
Calendar c = Calendar.getInstance();
|
Calendar c = Calendar.getInstance();
|
||||||
|
|
@ -399,11 +297,6 @@ public class InvoicingOrdersServiceImpl extends ServiceImpl<InvoicingOrdersMappe
|
||||||
entity.setUpdateTime(c.getTime());
|
entity.setUpdateTime(c.getTime());
|
||||||
entity.setId(invoicingOrdersEntity.getId());
|
entity.setId(invoicingOrdersEntity.getId());
|
||||||
baseMapper.updateById(entity);
|
baseMapper.updateById(entity);
|
||||||
// }catch (Exception e){
|
|
||||||
// e.printStackTrace();
|
|
||||||
// return Result.error("开始失败:"+e.getMessage());
|
|
||||||
// }
|
|
||||||
return Result.ok("开始成功");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -411,8 +304,7 @@ public class InvoicingOrdersServiceImpl extends ServiceImpl<InvoicingOrdersMappe
|
||||||
* @param invoicingOrdersEntity
|
* @param invoicingOrdersEntity
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public Result<String> finishDyThOrder(InvoicingOrdersEntity invoicingOrdersEntity){
|
public void finishDyThOrder(InvoicingOrdersEntity invoicingOrdersEntity){
|
||||||
// try {
|
|
||||||
log.info("Id:"+invoicingOrdersEntity.getId());
|
log.info("Id:"+invoicingOrdersEntity.getId());
|
||||||
log.info("UpdateBy:"+invoicingOrdersEntity.getInitiatorId());
|
log.info("UpdateBy:"+invoicingOrdersEntity.getInitiatorId());
|
||||||
Calendar c = Calendar.getInstance();
|
Calendar c = Calendar.getInstance();
|
||||||
|
|
@ -429,15 +321,10 @@ public class InvoicingOrdersServiceImpl extends ServiceImpl<InvoicingOrdersMappe
|
||||||
entity.setTollPrice(DirectivePrice.getTollPrice());
|
entity.setTollPrice(DirectivePrice.getTollPrice());
|
||||||
entity.setComPrice(DirectivePrice.getComPrice());
|
entity.setComPrice(DirectivePrice.getComPrice());
|
||||||
baseMapper.updateById(entity);
|
baseMapper.updateById(entity);
|
||||||
// }catch (Exception e){
|
|
||||||
// e.printStackTrace();
|
|
||||||
// return Result.error("完成失败:"+e.getMessage());
|
|
||||||
// }
|
|
||||||
return Result.ok("完成成功");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Result<String> updateOrderBizId(InvoicingOrdersEntity invoicingOrdersEntity){
|
public void updateOrderBizId(InvoicingOrdersEntity invoicingOrdersEntity){
|
||||||
|
|
||||||
log.info("function:updateOrderBizId");
|
log.info("function:updateOrderBizId");
|
||||||
log.info("BizId:"+invoicingOrdersEntity.getBizId());
|
log.info("BizId:"+invoicingOrdersEntity.getBizId());
|
||||||
|
|
@ -472,7 +359,49 @@ public class InvoicingOrdersServiceImpl extends ServiceImpl<InvoicingOrdersMappe
|
||||||
baseMapper.updateOrder(entity);
|
baseMapper.updateOrder(entity);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return Result.ok("修改业务单号成功");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取单号
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
private void getOrderNo(InvoicingOrders orders){
|
||||||
|
InvoicingOrders flow = baseMapper.getFlowOne(orders);
|
||||||
|
orders.setPadPath(flow.getPadPath());
|
||||||
|
String flowCode = flow.getFlowCode().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("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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -17,9 +17,12 @@ import com.nu.modules.invoicing.api.IInvoicingOrdersApi;
|
||||||
import com.nu.modules.sysconfig.ISysConfigApi;
|
import com.nu.modules.sysconfig.ISysConfigApi;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.jeecg.common.api.vo.Result;
|
import org.jeecg.common.api.vo.Result;
|
||||||
|
import org.jeecg.common.system.api.ISysBaseAPI;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.time.LocalDate;
|
||||||
|
import java.time.format.DateTimeFormatter;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
|
@ -37,6 +40,8 @@ public class QlOrdersServiceImpl extends ServiceImpl<InvoicingOrdersMapper, Invo
|
||||||
IEmpOrdersService empOrdersService;
|
IEmpOrdersService empOrdersService;
|
||||||
@Autowired
|
@Autowired
|
||||||
private ISysConfigApi sysConfigApi;
|
private ISysConfigApi sysConfigApi;
|
||||||
|
@Autowired
|
||||||
|
private ISysBaseAPI sysBaseAPI;
|
||||||
private String serverNetUrl;
|
private String serverNetUrl;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -301,7 +306,7 @@ public class QlOrdersServiceImpl extends ServiceImpl<InvoicingOrdersMapper, Invo
|
||||||
entity.setRemarks("请领申请作废");
|
entity.setRemarks("请领申请作废");
|
||||||
baseMapper.updateOrder(entity);
|
baseMapper.updateOrder(entity);
|
||||||
|
|
||||||
//ws推送
|
//ws推送库管通知
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -352,7 +357,7 @@ public class QlOrdersServiceImpl extends ServiceImpl<InvoicingOrdersMapper, Invo
|
||||||
entity.setRemarks("请领回退作废");
|
entity.setRemarks("请领回退作废");
|
||||||
baseMapper.updateOrder(entity);
|
baseMapper.updateOrder(entity);
|
||||||
|
|
||||||
//ws推送
|
//ws推送库管通知
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -403,11 +408,55 @@ public class QlOrdersServiceImpl extends ServiceImpl<InvoicingOrdersMapper, Invo
|
||||||
nextEntity.setEndTime(c.getTime());
|
nextEntity.setEndTime(c.getTime());
|
||||||
nextEntity.setEmployeeId(employeeId);
|
nextEntity.setEmployeeId(employeeId);
|
||||||
nextEntity.setEmployeeName(employeeName);
|
nextEntity.setEmployeeName(employeeName);
|
||||||
|
nextEntity.setPadPath(flowSub.getPadPath());
|
||||||
|
getOrderNo(nextEntity);
|
||||||
baseMapper.insert(nextEntity);
|
baseMapper.insert(nextEntity);
|
||||||
|
|
||||||
//ws推送 employeeId
|
//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("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);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取管理平台静态资源路径
|
* 获取管理平台静态资源路径
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -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.biz.invoicing.order.service.IThOrdersService;
|
||||||
import com.nu.modules.sysconfig.ISysConfigApi;
|
import com.nu.modules.sysconfig.ISysConfigApi;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.jeecg.common.system.api.ISysBaseAPI;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.time.LocalDate;
|
||||||
|
import java.time.format.DateTimeFormatter;
|
||||||
import java.util.Calendar;
|
import java.util.Calendar;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
|
@ -32,6 +35,8 @@ public class ThOrdersServiceImpl extends ServiceImpl<InvoicingOrdersMapper, Invo
|
||||||
IEmpOrdersService empOrdersService;
|
IEmpOrdersService empOrdersService;
|
||||||
@Autowired
|
@Autowired
|
||||||
private ISysConfigApi sysConfigApi;
|
private ISysConfigApi sysConfigApi;
|
||||||
|
@Autowired
|
||||||
|
private ISysBaseAPI sysBaseAPI;
|
||||||
private String serverNetUrl;
|
private String serverNetUrl;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -114,11 +119,54 @@ public class ThOrdersServiceImpl extends ServiceImpl<InvoicingOrdersMapper, Invo
|
||||||
nextEntity.setEndTime(c.getTime());
|
nextEntity.setEndTime(c.getTime());
|
||||||
nextEntity.setEmployeeId(employeeId);
|
nextEntity.setEmployeeId(employeeId);
|
||||||
nextEntity.setEmployeeName(employeeName);
|
nextEntity.setEmployeeName(employeeName);
|
||||||
|
nextEntity.setPadPath(flowSub.getPadPath());
|
||||||
|
getOrderNo(nextEntity);
|
||||||
baseMapper.insert(nextEntity);
|
baseMapper.insert(nextEntity);
|
||||||
|
|
||||||
//ws推送 employeeId
|
//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("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);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取管理平台静态资源路径
|
* 获取管理平台静态资源路径
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -87,4 +87,7 @@ public class ServiceFlowSub implements Serializable {
|
||||||
@ApiModelProperty(value = "是否删除 0未删除 1删除")
|
@ApiModelProperty(value = "是否删除 0未删除 1删除")
|
||||||
@TableLogic
|
@TableLogic
|
||||||
private java.lang.String delFlag;
|
private java.lang.String delFlag;
|
||||||
|
/**PAD路径*/
|
||||||
|
@ApiModelProperty(value = "PAD路径")
|
||||||
|
private java.lang.String padPath;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue