科室上货转销售出库

dev_2.5_ocean
yewj 4 months ago
parent c099bc5265
commit 5463ced953

@ -133,8 +133,6 @@ public class SysWorkplace implements Serializable {
public Integer jobMode; public Integer jobMode;
@TableField(exist = false) @TableField(exist = false)
private String invName; private String invName;

@ -200,7 +200,7 @@ public class FilterOrderRequest extends ListPageRequest {
private String unionRemark; private String unionRemark;
private String remark; private String remark;
// private String keywords; // private String keywords;
private Integer confirmStatus; private Integer confirmStatus;
private Boolean filterSelected; private Boolean filterSelected;
private List<String> inOrders; private List<String> inOrders;
@ -235,11 +235,15 @@ public class FilterOrderRequest extends ListPageRequest {
private String keyWords; private String keyWords;
/**
*
*/
private List<Long> workplaceCodes;
/** /**
* *
*/ */
private String workPlaceQueueCode; private String workPlaceQueueCode;
} }

@ -262,6 +262,14 @@ public class IoCollectOrderService extends ServiceImpl<IoCollectOrderMapper, IoC
filterOrderRequest.setAction(collectOrderRequest.getBusType()); filterOrderRequest.setAction(collectOrderRequest.getBusType());
filterOrderRequest.setKeyWords(collectOrderRequest.getKeyWords()); filterOrderRequest.setKeyWords(collectOrderRequest.getKeyWords());
if (collectOrderRequest.getBusType().equals(ConstantType.SPLIT_OUT)) {
List<SysWorkplace> sysWorkplaceList = sysWorkplaceService.list(new LambdaQueryWrapper<SysWorkplace>().eq(SysWorkplace::getJobMode, 1));
if (CollUtil.isNotEmpty(sysWorkplaceList)) {
List<Long> workplaceCodes = sysWorkplaceList.stream().map(SysWorkplace::getWorkplaceId).collect(Collectors.toList());
filterOrderRequest.setWorkplaceCodes(workplaceCodes);
filterOrderRequest.setStatus(7);
}
}
List<IoOrderResponse> list = orderService.filterList(filterOrderRequest); List<IoOrderResponse> list = orderService.filterList(filterOrderRequest);
if (list == null) { if (list == null) {
@ -338,6 +346,7 @@ public class IoCollectOrderService extends ServiceImpl<IoCollectOrderMapper, IoC
return ResultVOUtils.success("下载成功"); return ResultVOUtils.success("下载成功");
} }
@Resource @Resource
HeartService heartService; HeartService heartService;
@Resource @Resource

@ -41,6 +41,7 @@ public class AsyncIoCollectOrderDownloadTask implements SchedulingConfigurer {
IoCollectOriginService collectOriginService; IoCollectOriginService collectOriginService;
@Resource @Resource
IoCollectSetService collectSetService; IoCollectSetService collectSetService;
@Override @Override
public void configureTasks(ScheduledTaskRegistrar scheduledTaskRegistrar) { public void configureTasks(ScheduledTaskRegistrar scheduledTaskRegistrar) {
scheduledTaskRegistrar.addTriggerTask(() -> process(), scheduledTaskRegistrar.addTriggerTask(() -> process(),
@ -63,7 +64,7 @@ public class AsyncIoCollectOrderDownloadTask implements SchedulingConfigurer {
String startDownloadTimes = MsDateUtil.formatDateTime(startDownloadTime); String startDownloadTimes = MsDateUtil.formatDateTime(startDownloadTime);
Boolean autoDownload = ioCollectSet.getAutoDownload(); Boolean autoDownload = ioCollectSet.getAutoDownload();
if (StrUtil.isNotBlank(startDownloadTimes) && autoDownload){ if (StrUtil.isNotBlank(startDownloadTimes) && autoDownload) {
//获取当前时间 //获取当前时间
String paramValue = startDownloadTimes; String paramValue = startDownloadTimes;
String nowTime = MsDateUtil.getDateTime(); String nowTime = MsDateUtil.getDateTime();
@ -78,9 +79,9 @@ public class AsyncIoCollectOrderDownloadTask implements SchedulingConfigurer {
for (SysWorkplaceDocumentResponse sysWorkplaceDocumentResponse : sysWorkplaceDocumentResponses) { for (SysWorkplaceDocumentResponse sysWorkplaceDocumentResponse : sysWorkplaceDocumentResponses) {
String documentTypeCode = sysWorkplaceDocumentResponse.getDocumentTypeCode(); String documentTypeCode = sysWorkplaceDocumentResponse.getDocumentTypeCode();
collectOrderRequest.setBusType(documentTypeCode); collectOrderRequest.setBusType(documentTypeCode);
try{ try {
collectOriginService.downloadOrderV2(collectOrderRequest); collectOriginService.downloadOrderV2(collectOrderRequest);
}catch (Exception e){ } catch (Exception e) {
log.error("自动下载原始单据出错:{}", e.getMessage()); log.error("自动下载原始单据出错:{}", e.getMessage());
} }
} }
@ -90,6 +91,6 @@ public class AsyncIoCollectOrderDownloadTask implements SchedulingConfigurer {
collectSetService.updateById(ioCollectSet); collectSetService.updateById(ioCollectSet);
} }
} }
} }

@ -120,12 +120,10 @@
AND io.preInSelected is not null AND io.preInSelected is not null
</if> </if>
<if test="startTime != null and startTime != '' and endTime != null and endTime != ''"> <if test="startTime != null and startTime != '' and endTime != null and endTime != ''">
AND date_format(io.createTime, '%Y-%m-%d') between date_format(#{startTime}, '%Y-%m-%d') and AND io.createTime between #{startTime} and #{endTime}
date_format(#{endTime}, '%Y-%m-%d')
</if> </if>
<if test="startAduditTime != null and startAduditTime != '' and endAduditTime != null and endAduditTime != ''"> <if test="startAduditTime != null and startAduditTime != '' and endAduditTime != null and endAduditTime != ''">
AND date_format(io.auditTime, '%Y-%m-%d') between date_format(#{startAduditTime}, '%Y-%m-%d') and AND io.auditTime between #{startAduditTime} and #{endAduditTime}
date_format(#{endAduditTime}, '%Y-%m-%d')
</if> </if>
<if test="actions != null and actions.size() != 0"> <if test="actions != null and actions.size() != 0">
AND io.`action` in AND io.`action` in
@ -134,6 +132,13 @@
</foreach> </foreach>
</if> </if>
<if test="workplaceCodes != null and workplaceCodes.size() != 0">
AND io.`workPlaceCode` in
<foreach collection="workplaceCodes" index="index" item="item" open="(" close=")" separator=",">
#{item}
</foreach>
</if>
<if test="sourceTypes != null and sourceTypes.size() != 0"> <if test="sourceTypes != null and sourceTypes.size() != 0">
AND io.fromType in AND io.fromType in
<foreach collection="sourceTypes" index="index" item="item" open="(" close=")" separator=","> <foreach collection="sourceTypes" index="index" item="item" open="(" close=")" separator=",">
@ -257,7 +262,7 @@
from io_order from io_order
<where> <where>
<if test="billNo != null and billNo != ''"> <if test="billNo != null and billNo != ''">
AND billNo like concat( #{billNo}, '%') AND billNo like concat(#{billNo}, '%')
</if> </if>
<if test="action != null and action != ''"> <if test="action != null and action != ''">
AND action = #{action} AND action = #{action}
@ -315,13 +320,11 @@
SELECT io.* SELECT io.*
FROM io_order io FROM io_order io
WHERE (io.supplementNo IS NULL OR io.supplementNo = '') WHERE (io.supplementNo IS NULL OR io.supplementNo = '')
AND EXISTS( AND EXISTS(SELECT 1
SELECT 1
FROM basic_bussiness_type bbt FROM basic_bussiness_type bbt
WHERE bbt.action = io.action WHERE bbt.action = io.action
AND bbt.supplementOrderType IS NOT NULL AND bbt.supplementOrderType IS NOT NULL
AND bbt.supplementOrderType != '' AND bbt.supplementOrderType != '')
)
</select> </select>
<select id="selectBillNos" resultType="com.glxp.api.res.inout.OrderNoResult"> <select id="selectBillNos" resultType="com.glxp.api.res.inout.OrderNoResult">
@ -331,8 +334,7 @@
</select> </select>
<select id="selectUploadOrder" resultType="com.glxp.api.res.inout.IoOrderResponse"> <select id="selectUploadOrder" resultType="com.glxp.api.res.inout.IoOrderResponse">
SELECT SELECT io.*,
io.*,
ioul.result, ioul.result,
bbt.name AS billTypeName, bbt.name AS billTypeName,
ad.name AS deptName, ad.name AS deptName,
@ -345,8 +347,7 @@
aw_from.name AS fromInvName, aw_from.name AS fromInvName,
bc_from.name AS fromCorpName, bc_from.name AS fromCorpName,
bc_customer.name AS customerName bc_customer.name AS customerName
FROM FROM io_order io
io_order io
LEFT JOIN LEFT JOIN
io_order_upload_log ioul ON io.billNo = ioul.billNo io_order_upload_log ioul ON io.billNo = ioul.billNo
LEFT JOIN LEFT JOIN
@ -505,7 +506,7 @@
or io.outSickInfo like concat('%', #{unionRemark}, '%')) or io.outSickInfo like concat('%', #{unionRemark}, '%'))
</if> </if>
<if test="billNo != null and billNo != ''"> <if test="billNo != null and billNo != ''">
AND io.billNo like concat( #{billNo}, '%') AND io.billNo like concat(#{billNo}, '%')
</if> </if>
<if test="corpOrderId != null and corpOrderId != ''"> <if test="corpOrderId != null and corpOrderId != ''">
AND io.corpOrderId = #{corpOrderId} AND io.corpOrderId = #{corpOrderId}

Loading…
Cancel
Save