opt:增加仓库搜索
This commit is contained in:
@@ -22,10 +22,10 @@ public interface AllocationBillMapper extends BaseMapper<AllocationBill> {
|
|||||||
|
|
||||||
|
|
||||||
@DS("oracle_eas")
|
@DS("oracle_eas")
|
||||||
Long getAllocationCount(@Param("fuzzy") String fuzzy,@Param("ckbm") String ckbm);
|
Long getAllocationCount(@Param("fuzzy") String fuzzy,@Param("drkcbm") String drkcbm,@Param("dckcbm") String dckcbm);
|
||||||
|
|
||||||
@DS("oracle_eas")
|
@DS("oracle_eas")
|
||||||
List<AllocationBillQuery> allocationPage(@Param("fuzzy") String fuzzy, @Param("ckbm") String ckbm,@Param("page") Integer page, @Param("size") Integer size );
|
List<AllocationBillQuery> allocationPage(@Param("fuzzy") String fuzzy,@Param("drkcbm") String drkcbm,@Param("dckcbm") String dckcbm,@Param("page") Integer page, @Param("size") Integer size );
|
||||||
|
|
||||||
|
|
||||||
@Select("SELECT COUNT(*) FROM EAS_NOBLE.V_UC_STOCKTRANSFERBILL WHERE DJID = #{djid}")
|
@Select("SELECT COUNT(*) FROM EAS_NOBLE.V_UC_STOCKTRANSFERBILL WHERE DJID = #{djid}")
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
SELECT *
|
SELECT *
|
||||||
FROM EAS_NOBLE.V_UC_OUTINBILL
|
FROM EAS_NOBLE.V_UC_OUTINBILL
|
||||||
WHERE DJZT = '提交'
|
WHERE DJZT = '提交'
|
||||||
AND TO_DATE(cjsj, 'YYYY-MM-DD HH24:MI:SS') >= TRUNC(SYSDATE) - INTERVAL '60' DAY(3)
|
AND TO_DATE(cjsj, 'YYYY-MM-DD HH24:MI:SS') >= TRUNC(SYSDATE) - INTERVAL '1' DAY(3)
|
||||||
</select>
|
</select>
|
||||||
<select id="selectSrmPages" resultType="org.nl.wms.database.eas.dao.EasOutInBillDetail">
|
<select id="selectSrmPages" resultType="org.nl.wms.database.eas.dao.EasOutInBillDetail">
|
||||||
SELECT *,
|
SELECT *,
|
||||||
@@ -14,13 +14,13 @@
|
|||||||
WHERE DJZT = '未入库'
|
WHERE DJZT = '未入库'
|
||||||
AND CJSJ >= DATE_SUB(
|
AND CJSJ >= DATE_SUB(
|
||||||
CURDATE(),
|
CURDATE(),
|
||||||
INTERVAL 60 DAY)
|
INTERVAL 1 DAY)
|
||||||
</select>
|
</select>
|
||||||
<select id="selectPageWithInventory" resultType="org.nl.wms.database.eas.dao.EasOutInBillDetail">
|
<select id="selectPageWithInventory" resultType="org.nl.wms.database.eas.dao.EasOutInBillDetail">
|
||||||
SELECT *
|
SELECT *
|
||||||
FROM EAS_NOBLE.V_UC_OUTINBILL
|
FROM EAS_NOBLE.V_UC_OUTINBILL
|
||||||
WHERE DJZT = '提交'
|
WHERE DJZT = '提交'
|
||||||
AND TO_DATE(cjsj, 'YYYY-MM-DD HH24:MI:SS') >= TRUNC(SYSDATE) - INTERVAL '15' DAY(3)
|
AND TO_DATE(cjsj, 'YYYY-MM-DD HH24:MI:SS') >= TRUNC(SYSDATE) - INTERVAL '30' DAY(3)
|
||||||
</select>
|
</select>
|
||||||
<select id="selectSrmPageWithInventory" resultType="org.nl.wms.database.eas.dao.EasOutInBillDetail">
|
<select id="selectSrmPageWithInventory" resultType="org.nl.wms.database.eas.dao.EasOutInBillDetail">
|
||||||
SELECT *,
|
SELECT *,
|
||||||
@@ -29,21 +29,21 @@
|
|||||||
WHERE DJZT = '未入库'
|
WHERE DJZT = '未入库'
|
||||||
AND CJSJ >= DATE_SUB(
|
AND CJSJ >= DATE_SUB(
|
||||||
CURDATE(),
|
CURDATE(),
|
||||||
INTERVAL 15 DAY)
|
INTERVAL 30 DAY)
|
||||||
</select>
|
</select>
|
||||||
<select id="selectEasIds" resultType="org.nl.wms.database.eas.dao.EasOutInBillDetail">
|
<select id="selectEasIds" resultType="org.nl.wms.database.eas.dao.EasOutInBillDetail">
|
||||||
SELECT DJID,
|
SELECT DJID,
|
||||||
FLID
|
FLID
|
||||||
FROM EAS_NOBLE.V_UC_OUTINBILL
|
FROM EAS_NOBLE.V_UC_OUTINBILL
|
||||||
WHERE DJZT = '提交'
|
WHERE DJZT = '提交'
|
||||||
AND TO_DATE(cjsj, 'YYYY-MM-DD') >= TRUNC(SYSDATE) - INTERVAL '15' DAY(3)
|
AND TO_DATE(cjsj, 'YYYY-MM-DD') >= TRUNC(SYSDATE) - INTERVAL '30' DAY(3)
|
||||||
</select>
|
</select>
|
||||||
<select id="selectSrmIds" resultType="org.nl.wms.database.eas.dao.EasOutInBillDetail">
|
<select id="selectSrmIds" resultType="org.nl.wms.database.eas.dao.EasOutInBillDetail">
|
||||||
SELECT FLID,
|
SELECT FLID,
|
||||||
DJID
|
DJID
|
||||||
FROM V_WMS_INBILL_THIRD
|
FROM V_WMS_INBILL_THIRD
|
||||||
WHERE DJZT = '未入库'
|
WHERE DJZT = '未入库'
|
||||||
AND CJSJ >= DATE_SUB(CURDATE(), INTERVAL 15 DAY)
|
AND CJSJ >= DATE_SUB(CURDATE(), INTERVAL 30 DAY)
|
||||||
</select>
|
</select>
|
||||||
<select id="selectByConditions" resultType="org.nl.wms.database.eas.dao.InventoryInfo">
|
<select id="selectByConditions" resultType="org.nl.wms.database.eas.dao.InventoryInfo">
|
||||||
SELECT
|
SELECT
|
||||||
|
|||||||
@@ -24,7 +24,10 @@ public class InventoryInfos extends Model<InventoryInfos> {
|
|||||||
//@TableId(value = "id", type = IdType.NONE)
|
//@TableId(value = "id", type = IdType.NONE)
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 库存id
|
||||||
|
*/
|
||||||
|
private String id;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 物料编码
|
* 物料编码
|
||||||
|
|||||||
@@ -68,14 +68,14 @@ public class AllocationBillServiceImpl extends ServiceImpl<AllocationBillMapper,
|
|||||||
AtomicLong totalCount = new AtomicLong(0L);
|
AtomicLong totalCount = new AtomicLong(0L);
|
||||||
CompletableFuture<Void> count = CompletableFuture.runAsync(() -> {
|
CompletableFuture<Void> count = CompletableFuture.runAsync(() -> {
|
||||||
try {
|
try {
|
||||||
totalCount.set(allocationBillMapper.getAllocationCount(params.getFuzzy(), params.getKczzbm()));
|
totalCount.set(allocationBillMapper.getAllocationCount(params.getFuzzy(),params.getDrkcbm(), params.getDckcbm()));
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
log.error("异常信息:" + e);
|
log.error("异常信息:" + e);
|
||||||
}
|
}
|
||||||
}, pool);
|
}, pool);
|
||||||
CompletableFuture<List<AllocationBillQuery>> page = CompletableFuture.supplyAsync(() -> {
|
CompletableFuture<List<AllocationBillQuery>> page = CompletableFuture.supplyAsync(() -> {
|
||||||
try {
|
try {
|
||||||
return allocationBillMapper.allocationPage(params.getFuzzy(), params.getKczzbm(), params.getPage(), params.getSize());
|
return allocationBillMapper.allocationPage(params.getFuzzy(),params.getDrkcbm(), params.getDckcbm(),params.getPage(), params.getSize());
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
log.error("异常信息:" + e);
|
log.error("异常信息:" + e);
|
||||||
return Collections.emptyList();
|
return Collections.emptyList();
|
||||||
@@ -262,7 +262,7 @@ public class AllocationBillServiceImpl extends ServiceImpl<AllocationBillMapper,
|
|||||||
// 如果不存在该记录,则插入数据
|
// 如果不存在该记录,则插入数据
|
||||||
AllocationBill bill = new AllocationBill();
|
AllocationBill bill = new AllocationBill();
|
||||||
bill.setFlid(id);
|
bill.setFlid(id);
|
||||||
bill.setShjg(msgDto.getMsg());
|
bill.setShjg("审核失败:"+msgDto.getMsg());
|
||||||
bill.setUpdate_id(SecurityUtils.getCurrentUsername());
|
bill.setUpdate_id(SecurityUtils.getCurrentUsername());
|
||||||
bill.setUpdate_name(SecurityUtils.getCurrentNickName());
|
bill.setUpdate_name(SecurityUtils.getCurrentNickName());
|
||||||
bill.setUpdate_time(DateUtil.format(DateUtil.beginOfDay(DateUtil.date()), "yyyy-MM-dd"));
|
bill.setUpdate_time(DateUtil.format(DateUtil.beginOfDay(DateUtil.date()), "yyyy-MM-dd"));
|
||||||
|
|||||||
@@ -99,7 +99,7 @@ public class EasOutInBillServiceImpl extends ServiceImpl<EasOutInBillMapper, Eas
|
|||||||
}, pool);
|
}, pool);
|
||||||
CompletableFuture<Void> allocation = CompletableFuture.runAsync(() -> {
|
CompletableFuture<Void> allocation = CompletableFuture.runAsync(() -> {
|
||||||
try {
|
try {
|
||||||
allocationCount.set(allocationBillMapper.getAllocationCount("", ""));
|
allocationCount.set(allocationBillMapper.getAllocationCount("", "", ""));
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
log.error("异常信息:" + e);
|
log.error("异常信息:" + e);
|
||||||
}
|
}
|
||||||
@@ -302,6 +302,7 @@ public class EasOutInBillServiceImpl extends ServiceImpl<EasOutInBillMapper, Eas
|
|||||||
bill.setCode(IdUtil.getStringId());
|
bill.setCode(IdUtil.getStringId());
|
||||||
bill.setTjkwbm(bill.getKwbm());
|
bill.setTjkwbm(bill.getKwbm());
|
||||||
bill.setCzsl(BigDecimal.ZERO);
|
bill.setCzsl(BigDecimal.ZERO);
|
||||||
|
bill.setCzsl(BigDecimal.ZERO);
|
||||||
bill.setKcsl(BigDecimal.ZERO);
|
bill.setKcsl(BigDecimal.ZERO);
|
||||||
if (bill.getSl().compareTo(BigDecimal.ZERO) < 0) {
|
if (bill.getSl().compareTo(BigDecimal.ZERO) < 0) {
|
||||||
bill.setSl(bill.getSl().abs());
|
bill.setSl(bill.getSl().abs());
|
||||||
@@ -621,7 +622,7 @@ public class EasOutInBillServiceImpl extends ServiceImpl<EasOutInBillMapper, Eas
|
|||||||
msgDto = wmsToEasService.sendWebService(billJson);
|
msgDto = wmsToEasService.sendWebService(billJson);
|
||||||
if (msgDto != null) {
|
if (msgDto != null) {
|
||||||
if (msgDto.getResult() == 0) {
|
if (msgDto.getResult() == 0) {
|
||||||
msg = msgDto.getMsg();
|
msg = "审核失败:"+msgDto.getMsg();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@@ -630,7 +631,7 @@ public class EasOutInBillServiceImpl extends ServiceImpl<EasOutInBillMapper, Eas
|
|||||||
srmMsgDto = wmsToSrmService.sendWebPostData(billJson, 1);
|
srmMsgDto = wmsToSrmService.sendWebPostData(billJson, 1);
|
||||||
if (srmMsgDto != null) {
|
if (srmMsgDto != null) {
|
||||||
if ("false".equals(srmMsgDto.getSuccess())) {
|
if ("false".equals(srmMsgDto.getSuccess())) {
|
||||||
msg = srmMsgDto.getMessage();
|
msg = "审核失败:"+srmMsgDto.getMessage();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -187,7 +187,7 @@ public class ReceiptBillServiceImpl extends ServiceImpl<ReceiptBillMapper, Recei
|
|||||||
// 如果不存在该记录,则插入数据
|
// 如果不存在该记录,则插入数据
|
||||||
ReceiptBill bill = new ReceiptBill();
|
ReceiptBill bill = new ReceiptBill();
|
||||||
bill.setFlid(id);
|
bill.setFlid(id);
|
||||||
bill.setShjg(srmMsgDto.getMessage());
|
bill.setShjg("审核失败:"+srmMsgDto.getMessage());
|
||||||
bill.setUpdate_id(SecurityUtils.getCurrentUsername());
|
bill.setUpdate_id(SecurityUtils.getCurrentUsername());
|
||||||
bill.setUpdate_name(SecurityUtils.getCurrentNickName());
|
bill.setUpdate_name(SecurityUtils.getCurrentNickName());
|
||||||
bill.setUpdate_time(DateUtil.format(DateUtil.beginOfDay(DateUtil.date()), "yyyy-MM-dd"));
|
bill.setUpdate_time(DateUtil.format(DateUtil.beginOfDay(DateUtil.date()), "yyyy-MM-dd"));
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ public class EasBillSchedule {
|
|||||||
* eas单据数据同步
|
* eas单据数据同步
|
||||||
*/
|
*/
|
||||||
@Async("taskExecutor")
|
@Async("taskExecutor")
|
||||||
@Scheduled(cron = "0/60 * * * * *")
|
@Scheduled(cron = "0/120 * * * * *")
|
||||||
public void getEasOutInBills() {
|
public void getEasOutInBills() {
|
||||||
// 获取eas视图查询未提交的单据
|
// 获取eas视图查询未提交的单据
|
||||||
List<EasOutInBillDetail> easOutInBillDetails = easOutInBillDetailMapper.selectPageWithInventory();
|
List<EasOutInBillDetail> easOutInBillDetails = easOutInBillDetailMapper.selectPageWithInventory();
|
||||||
@@ -65,7 +65,7 @@ public class EasBillSchedule {
|
|||||||
|
|
||||||
|
|
||||||
@Async("taskExecutor")
|
@Async("taskExecutor")
|
||||||
@Scheduled(cron = "0/30 * * * * *")
|
@Scheduled(cron = "0/45 * * * * *")
|
||||||
public void insertOutInBills() {
|
public void insertOutInBills() {
|
||||||
// 获取eas视图查询未提交的单据
|
// 获取eas视图查询未提交的单据
|
||||||
List<EasOutInBillDetail> easOutInBillDetails = easOutInBillDetailMapper.selectEasPages();
|
List<EasOutInBillDetail> easOutInBillDetails = easOutInBillDetailMapper.selectEasPages();
|
||||||
@@ -84,7 +84,7 @@ public class EasBillSchedule {
|
|||||||
|
|
||||||
|
|
||||||
@Async("taskExecutor")
|
@Async("taskExecutor")
|
||||||
@Scheduled(cron = "0/60 * * * * *")
|
@Scheduled(cron = "0/90 * * * * *")
|
||||||
public void insertUsers() {
|
public void insertUsers() {
|
||||||
List<SysUser> newUsers =sysUserMapper.queryUserList();
|
List<SysUser> newUsers =sysUserMapper.queryUserList();
|
||||||
List<SysUser> existingUsers =sysUserMapper.selectList(new LambdaQueryWrapper<SysUser>().eq(SysUser::getIs_used,"1"));
|
List<SysUser> existingUsers =sysUserMapper.selectList(new LambdaQueryWrapper<SysUser>().eq(SysUser::getIs_used,"1"));
|
||||||
|
|||||||
Reference in New Issue
Block a user