Browse Source

opt:增加仓库搜索

master1
gongbaoxiong 11 months ago
parent
commit
c74dfebdb0
  1. 2
      nlsso-server/src/main/java/org/nl/common/base/CommonPage.java
  2. 2
      nlsso-server/src/main/java/org/nl/common/base/ResultCode.java
  3. 4
      nlsso-server/src/main/java/org/nl/wms/database/eas/controller/AllocationBillController.java
  4. 2
      nlsso-server/src/main/java/org/nl/wms/database/eas/controller/EasOutInBillController.java
  5. 2
      nlsso-server/src/main/java/org/nl/wms/database/eas/dao/mapper/EasOutInBillMapper.java
  6. 11
      nlsso-server/src/main/java/org/nl/wms/database/eas/dao/xml/AllocationBillMapper.xml
  7. 12
      nlsso-server/src/main/java/org/nl/wms/database/eas/dao/xml/EasOutInBillDetailMapper.xml
  8. 14
      nlsso-server/src/main/java/org/nl/wms/database/eas/dto/InventoryInfos.java
  9. 2
      nlsso-server/src/main/java/org/nl/wms/database/eas/service/IallocationBillService.java
  10. 154
      nlsso-server/src/main/java/org/nl/wms/database/eas/service/impl/AllocationBillServiceImpl.java
  11. 31
      nlsso-server/src/main/java/org/nl/wms/database/eas/service/impl/EasOutInBillServiceImpl.java
  12. 7
      nlsso-server/src/main/java/org/nl/wms/database/eas/service/impl/ReceiptBillServiceImpl.java
  13. 2
      nlsso-server/src/main/java/org/nl/wms/schedule/EasBillSchedule.java

2
nlsso-server/src/main/java/org/nl/common/base/CommonPage.java

@ -53,7 +53,7 @@ public class CommonPage<T> {
CommonPage<T> result = new CommonPage<>(); CommonPage<T> result = new CommonPage<>();
result.setResult(pageResult); result.setResult(pageResult);
result.setCode(1); result.setCode(1);
result.setDesc("操作成"); result.setDesc("操作成");
return result; return result;
} }

2
nlsso-server/src/main/java/org/nl/common/base/ResultCode.java

@ -7,7 +7,7 @@ import com.baomidou.mybatisplus.extension.api.IErrorCode;
*/ */
public enum ResultCode implements IErrorCode { public enum ResultCode implements IErrorCode {
// //
SUCCESS(1, "操作成"), SUCCESS(1, "操作成"),
FAILED(0, "操作失败"), FAILED(0, "操作失败"),
MISS_PARAMETER(400, "参数缺失"), MISS_PARAMETER(400, "参数缺失"),
UNAUTHORIZED(401, "暂未登录或token已经过期"), UNAUTHORIZED(401, "暂未登录或token已经过期"),

4
nlsso-server/src/main/java/org/nl/wms/database/eas/controller/AllocationBillController.java

@ -81,9 +81,9 @@ public class AllocationBillController {
* *
* @param params 根据条件查询库存跟踪号 * @param params 根据条件查询库存跟踪号
*/ */
@PostMapping("/getInventoryInfo") @PostMapping("/queryInventoryInfo")
@Log("根据条件查询库存跟踪号") @Log("根据条件查询库存跟踪号")
public ResponseEntity<List<InventoryInfos>> getInventoryInfo(@RequestBody AllocationBillVO params) { public ResponseEntity<CommonPage<InventoryInfos>> queryInventoryInfo(@RequestBody AllocationBillVO params) {
return new ResponseEntity<>(allocationBillService.getInventoryInfo(params), HttpStatus.OK); return new ResponseEntity<>(allocationBillService.getInventoryInfo(params), HttpStatus.OK);
} }

2
nlsso-server/src/main/java/org/nl/wms/database/eas/controller/EasOutInBillController.java

@ -110,7 +110,7 @@ public class EasOutInBillController {
/** /**
* 获取仓库信息 * 获取仓库信息
*/ */
@PostMapping("/getUserInfo") @PostMapping("/getWarehouseInfo")
@Log("获取仓库信息") @Log("获取仓库信息")
public CommonResult<List<WarehouseInfo>> getWarehouseInfo() { public CommonResult<List<WarehouseInfo>> getWarehouseInfo() {
return RestBusinessTemplate.execute(() -> easOutInBillService.getWarehouseInfo()); return RestBusinessTemplate.execute(() -> easOutInBillService.getWarehouseInfo());

2
nlsso-server/src/main/java/org/nl/wms/database/eas/dao/mapper/EasOutInBillMapper.java

@ -50,7 +50,7 @@ public interface EasOutInBillMapper extends BaseMapper<EasOutInBill> {
List<WarehouseInfo> getOrganizationInfo(); List<WarehouseInfo> getOrganizationInfo();
@Select("SELECT * FROM EAS_NOBLE.V_UC_USERINFO") @Select("SELECT YHBM AS CGYBM,YHMC AS CGYMC FROM EAS_NOBLE.V_UC_USERINFO")
@DS("oracle_eas") @DS("oracle_eas")
List<WarehouseInfo> getUserInfo(); List<WarehouseInfo> getUserInfo();

11
nlsso-server/src/main/java/org/nl/wms/database/eas/dao/xml/AllocationBillMapper.xml

@ -58,16 +58,7 @@
<select id="selectByCondition" resultType="org.nl.wms.database.eas.dto.InventoryInfos"> <select id="selectByCondition" resultType="org.nl.wms.database.eas.dto.InventoryInfos">
SELECT SELECT
materialNo, *
materialName,
warehouseNo,
warehouseName
locationNo,
locationName,
lot,
curStoreQty,
unitNo,
trackNo
FROM EAS_NOBLE.V_UC_INVENTORYINFO FROM EAS_NOBLE.V_UC_INVENTORYINFO
<where> <where>
<if test="dckcbm != null and dckcbm != ''"> <if test="dckcbm != null and dckcbm != ''">

12
nlsso-server/src/main/java/org/nl/wms/database/eas/dao/xml/EasOutInBillDetailMapper.xml

@ -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 '1' DAY(3) AND TO_DATE(cjsj, 'YYYY-MM-DD HH24:MI:SS') >= TRUNC(SYSDATE) - INTERVAL '60' 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 1 DAY) INTERVAL 60 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 '30' DAY(3) AND TO_DATE(cjsj, 'YYYY-MM-DD HH24:MI:SS') >= TRUNC(SYSDATE) - INTERVAL '15' 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 30 DAY) INTERVAL 15 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 '30' DAY(3) AND TO_DATE(cjsj, 'YYYY-MM-DD') >= TRUNC(SYSDATE) - INTERVAL '15' 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 30 DAY) AND CJSJ >= DATE_SUB(CURDATE(), INTERVAL 15 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

14
nlsso-server/src/main/java/org/nl/wms/database/eas/dto/InventoryInfos.java

@ -23,17 +23,8 @@ public class InventoryInfos extends Model<InventoryInfos> {
private static final long serialVersionUID = -7739291296662381393L; private static final long serialVersionUID = -7739291296662381393L;
//@TableId(value = "id", type = IdType.NONE) //@TableId(value = "id", type = IdType.NONE)
/**
* 主键id
*/
private String trackNo;
/**
* 单据编号
*/
private String djbh;
/** /**
* 物料编码 * 物料编码
@ -69,10 +60,7 @@ public class InventoryInfos extends Model<InventoryInfos> {
private String locationName; private String locationName;
/**
* 库存数量
*/
private BigDecimal kcsl;
/** /**
* 数量 * 数量

2
nlsso-server/src/main/java/org/nl/wms/database/eas/service/IallocationBillService.java

@ -61,7 +61,7 @@ public interface IallocationBillService extends IService<AllocationBill> {
* @param params 查询条件 * @param params 查询条件
* @return String * @return String
*/ */
List<InventoryInfos> getInventoryInfo(AllocationBillVO params); CommonPage<InventoryInfos> getInventoryInfo(AllocationBillVO params);
/** /**
* 创建 * 创建

154
nlsso-server/src/main/java/org/nl/wms/database/eas/service/impl/AllocationBillServiceImpl.java

@ -6,6 +6,7 @@ import com.alibaba.fastjson.JSONObject;
import com.alibaba.fastjson.serializer.SerializerFeature; import com.alibaba.fastjson.serializer.SerializerFeature;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.sun.org.apache.regexp.internal.RE;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.nl.common.exception.BadRequestException; import org.nl.common.exception.BadRequestException;
import org.nl.common.utils.SecurityUtils; import org.nl.common.utils.SecurityUtils;
@ -96,27 +97,22 @@ public class AllocationBillServiceImpl extends ServiceImpl<AllocationBillMapper,
// 处理查询结果 // 处理查询结果
if (allocationBills != null && !allocationBills.isEmpty()) { if (allocationBills != null && !allocationBills.isEmpty()) {
// 获取更新列表 // 获取更新列表
List<AllocationBill> updateList = allocationBillMapper.selectList( List<AllocationBill> updateList = allocationBillMapper.selectList(new LambdaQueryWrapper<AllocationBill>().in(AllocationBill::getFlid, allocationBills.stream().map(AllocationBillQuery::getDjid).collect(Collectors.toList())));
new LambdaQueryWrapper<AllocationBill>()
.in(AllocationBill::getDjid, allocationBills.stream().map(AllocationBillQuery::getDjid).collect(Collectors.toList())));
if (!updateList.isEmpty()) { if (!updateList.isEmpty()) {
Map<String, AllocationBill> updateMap = updateList.stream() Map<String, AllocationBill> updateMap = updateList.stream().collect(Collectors.toMap(AllocationBill::getFlid, updateBill -> updateBill));
.collect(Collectors.toMap(AllocationBill::getFlid, updateBill -> updateBill));
// 替换为修改记录 // 替换为修改记录
allocationBills = allocationBills.stream() allocationBills = allocationBills.stream().map(a -> {
.map(a -> { AllocationBill updatedBill = updateMap.get(a.getDjid());
AllocationBill updatedBill = updateMap.get(a.getDjid()); if (updatedBill != null) {
if (updatedBill != null) { a.setUpdate_id(updatedBill.getUpdate_id());
a.setUpdate_id(updatedBill.getUpdate_id()); a.setUpdate_name(updatedBill.getUpdate_name());
a.setUpdate_name(updatedBill.getUpdate_name()); a.setUpdate_time(updatedBill.getUpdate_time());
a.setUpdate_time(updatedBill.getUpdate_time()); a.setShjg(updatedBill.getShjg());
a.setShjg(updatedBill.getShjg()); }
} a.setJhdrrq(LocalDateTime.parse(a.getJhdrrq(), DateTimeFormatter.ofPattern("yyyy/MM/dd HH:mm:ss")).toLocalDate().toString());
a.setJhdrrq(LocalDateTime.parse(a.getJhdrrq(), DateTimeFormatter.ofPattern("yyyy/MM/dd HH:mm:ss")).toLocalDate().toString()); a.setJhdcrq(LocalDateTime.parse(a.getJhdcrq(), DateTimeFormatter.ofPattern("yyyy/MM/dd HH:mm:ss")).toLocalDate().toString());
a.setJhdcrq(LocalDateTime.parse(a.getJhdcrq(), DateTimeFormatter.ofPattern("yyyy/MM/dd HH:mm:ss")).toLocalDate().toString()); return a;
return a; }).collect(Collectors.toList());
})
.collect(Collectors.toList());
} }
} }
return CommonPage.getPage(allocationBills, totalCount.get(), params.getPage(), params.getSize()); return CommonPage.getPage(allocationBills, totalCount.get(), params.getPage(), params.getSize());
@ -144,39 +140,35 @@ public class AllocationBillServiceImpl extends ServiceImpl<AllocationBillMapper,
} }
}).collect(Collectors.toList()); }).collect(Collectors.toList());
// 获取更新列表 // 获取更新列表
List<AllocationBill> updateList = allocationBillMapper.selectList( List<AllocationBill> updateList = allocationBillMapper.selectList(new LambdaQueryWrapper<AllocationBill>().eq(AllocationBill::getDjid, allocationBillList.get(0).getDjid()));
new LambdaQueryWrapper<AllocationBill>().eq(AllocationBill::getDjid, allocationBillList.get(0).getDjid()));
if (!updateList.isEmpty()) { if (!updateList.isEmpty()) {
Map<String, AllocationBill> updateMap = updateList.stream() Map<String, AllocationBill> updateMap = updateList.stream().collect(Collectors.toMap(AllocationBill::getFlid, updateBill -> updateBill));
.collect(Collectors.toMap(AllocationBill::getFlid, updateBill -> updateBill));
// 替换为修改记录 // 替换为修改记录
allocationBillList = allocationBillList.stream() allocationBillList = allocationBillList.stream().map(allocationBill -> {
.map(allocationBill -> { AllocationBill updatedBill = updateMap.get(allocationBill.getFlid());
AllocationBill updatedBill = updateMap.get(allocationBill.getFlid()); if (updatedBill != null) {
if (updatedBill != null) { allocationBill.setYwrq(updatedBill.getYwrq());
allocationBill.setYwrq(updatedBill.getYwrq()); allocationBill.setBtbz(updatedBill.getBtbz());
allocationBill.setBtbz(updatedBill.getBtbz()); allocationBill.setJldw(updatedBill.getJldw());
allocationBill.setJldw(updatedBill.getJldw()); allocationBill.setSl(updatedBill.getSl());
allocationBill.setSl(updatedBill.getSl()); allocationBill.setDcckbm(updatedBill.getDcckbm());
allocationBill.setDcckbm(updatedBill.getDcckbm()); allocationBill.setDckwbm(updatedBill.getDckwbm());
allocationBill.setDckwbm(updatedBill.getDckwbm()); allocationBill.setDrckbm(updatedBill.getDrckbm());
allocationBill.setDrckbm(updatedBill.getDrckbm()); allocationBill.setDrkwbm(updatedBill.getDrkwbm());
allocationBill.setDrkwbm(updatedBill.getDrkwbm()); allocationBill.setUpdate_id(updatedBill.getUpdate_id());
allocationBill.setUpdate_id(updatedBill.getUpdate_id()); allocationBill.setUpdate_name(updatedBill.getUpdate_name());
allocationBill.setUpdate_name(updatedBill.getUpdate_name()); allocationBill.setUpdate_time(updatedBill.getUpdate_time());
allocationBill.setUpdate_time(updatedBill.getUpdate_time()); if (updatedBill.getJhdrrq().contains("/") || updatedBill.getJhdcrq().contains("/")) {
if (updatedBill.getJhdrrq().contains("/") || updatedBill.getJhdcrq().contains("/")) { allocationBill.setJhdrrq(LocalDateTime.parse(updatedBill.getJhdrrq(), DateTimeFormatter.ofPattern("yyyy/MM/dd HH:mm:ss")).toLocalDate().toString());
allocationBill.setJhdrrq(LocalDateTime.parse(updatedBill.getJhdrrq(), DateTimeFormatter.ofPattern("yyyy/MM/dd HH:mm:ss")).toLocalDate().toString()); allocationBill.setJhdcrq(LocalDateTime.parse(updatedBill.getJhdcrq(), DateTimeFormatter.ofPattern("yyyy/MM/dd HH:mm:ss")).toLocalDate().toString());
allocationBill.setJhdcrq(LocalDateTime.parse(updatedBill.getJhdcrq(), DateTimeFormatter.ofPattern("yyyy/MM/dd HH:mm:ss")).toLocalDate().toString()); } else {
} else { allocationBill.setJhdrrq(updatedBill.getJhdrrq());
allocationBill.setJhdrrq(updatedBill.getJhdrrq()); allocationBill.setJhdcrq(updatedBill.getJhdcrq());
allocationBill.setJhdcrq(updatedBill.getJhdcrq()); }
} allocationBill.setBtbz(updatedBill.getBz());
allocationBill.setBtbz(updatedBill.getBz()); }
} return allocationBill;
return allocationBill; }).collect(Collectors.toList());
})
.collect(Collectors.toList());
} }
} }
return CommonPage.getPage(allocationBillList, totalCount, params.getPage(), params.getSize()); return CommonPage.getPage(allocationBillList, totalCount, params.getPage(), params.getSize());
@ -190,12 +182,7 @@ public class AllocationBillServiceImpl extends ServiceImpl<AllocationBillMapper,
*/ */
@Override @Override
public List<AllocationBill> query(AllocationBillVO params) { public List<AllocationBill> query(AllocationBillVO params) {
return allocationBillMapper.selectList(new QueryWrapper<AllocationBill>() return allocationBillMapper.selectList(new QueryWrapper<AllocationBill>().lambda().eq(ObjectUtil.isNotEmpty(params), AllocationBill::getDjbh, params.getFuzzy()).or().eq(ObjectUtil.isNotEmpty(params), AllocationBill::getDjid, params.getFuzzy()));
.lambda()
.eq(ObjectUtil.isNotEmpty(params), AllocationBill::getDjbh, params.getFuzzy())
.or()
.eq(ObjectUtil.isNotEmpty(params), AllocationBill::getDjid, params.getFuzzy())
);
} }
/** /**
@ -204,8 +191,15 @@ public class AllocationBillServiceImpl extends ServiceImpl<AllocationBillMapper,
* @param params 查询条件 * @param params 查询条件
*/ */
@Override @Override
public List<InventoryInfos> getInventoryInfo(AllocationBillVO params) { public CommonPage<InventoryInfos> getInventoryInfo(AllocationBillVO params) {
return allocationBillMapper.selectByCondition(params.getDckcbm(), params.getDcckbm(), params.getDckwbm(), params.getWlbm(), params.getPc(), params.getGzh()); // if (StringUtils.isBlank(params.getDckcbm()) && StringUtils.isBlank(params.getDcckbm()) && StringUtils.isBlank(params.getDckwbm()) && StringUtils.isBlank(params.getWlbm()) && StringUtils.isBlank(params.getPc())&& StringUtils.isBlank(params.getGzh())
// {
// return null;
// }else{
// List<InventoryInfos> result = allocationBillMapper.selectByCondition(params.getDckcbm(), params.getDcckbm(), params.getDckwbm(), params.getWlbm(), params.getPc(), "999");
// return CommonPage.restPage(result);
// }
return null;
} }
@ -232,26 +226,25 @@ public class AllocationBillServiceImpl extends ServiceImpl<AllocationBillMapper,
allocationBillDto.setInWhUser(SecurityUtils.getCurrentUsername()); allocationBillDto.setInWhUser(SecurityUtils.getCurrentUsername());
List<AllocationBillDetailDto> entrys = new ArrayList<>(); List<AllocationBillDetailDto> entrys = new ArrayList<>();
params.forEach(r -> { params.forEach(r -> {
AllocationBillDetailDto dto = new AllocationBillDetailDto(); AllocationBillDetailDto dto = new AllocationBillDetailDto();
dto.setSeq(r.getFlxh()); dto.setSeq(r.getFlxh());
dto.setEntryId(r.getFlid()); dto.setEntryId(r.getFlid());
dto.setQty(r.getSl()); dto.setQty(r.getSl());
dto.setUnitNo(r.getJldw()); dto.setUnitNo(r.getJldw());
dto.setReceiptWarehouseNo(r.getDrckbm()); dto.setReceiptWarehouseNo(r.getDrckbm());
dto.setReceiptLocationNo(r.getDrkwbm()); dto.setReceiptLocationNo(r.getDrkwbm());
dto.setIssueWarehouseNo(r.getDcckbm()); dto.setIssueWarehouseNo(r.getDcckbm());
dto.setIssueLocationNo(r.getDckwbm()); dto.setIssueLocationNo(r.getDckwbm());
if (r.getJhdrrq().contains("/") || r.getJhdcrq().contains("/")) { if (r.getJhdrrq().contains("/") || r.getJhdcrq().contains("/")) {
dto.setReceiptPlanDate(LocalDateTime.parse(r.getJhdrrq(), DateTimeFormatter.ofPattern("yyyy/MM/dd HH:mm:ss")).toLocalDate().toString()); dto.setReceiptPlanDate(LocalDateTime.parse(r.getJhdrrq(), DateTimeFormatter.ofPattern("yyyy/MM/dd HH:mm:ss")).toLocalDate().toString());
dto.setIssuePlanDate(LocalDateTime.parse(r.getJhdcrq(), DateTimeFormatter.ofPattern("yyyy/MM/dd HH:mm:ss")).toLocalDate().toString()); dto.setIssuePlanDate(LocalDateTime.parse(r.getJhdcrq(), DateTimeFormatter.ofPattern("yyyy/MM/dd HH:mm:ss")).toLocalDate().toString());
} else { } else {
dto.setReceiptPlanDate(r.getJhdrrq()); dto.setReceiptPlanDate(r.getJhdrrq());
dto.setIssuePlanDate(r.getJhdcrq()); dto.setIssuePlanDate(r.getJhdcrq());
} }
dto.setRemark(r.getBz()); dto.setRemark(r.getBz());
entrys.add(dto); entrys.add(dto);
} });
);
allocationBillDto.setEntrys(entrys); allocationBillDto.setEntrys(entrys);
AllocationEasData easData = new AllocationEasData(); AllocationEasData easData = new AllocationEasData();
easData.setData(allocationBillDto); easData.setData(allocationBillDto);
@ -270,8 +263,11 @@ public class AllocationBillServiceImpl extends ServiceImpl<AllocationBillMapper,
if (allocationBill == null) { if (allocationBill == null) {
// 如果不存在该记录,则插入数据 // 如果不存在该记录,则插入数据
AllocationBill bill = new AllocationBill(); AllocationBill bill = new AllocationBill();
bill.setDjid(id); bill.setFlid(id);
bill.setShjg(msgDto.getMsg()); bill.setShjg(msgDto.getMsg());
bill.setUpdate_id(SecurityUtils.getCurrentUsername());
bill.setUpdate_name(SecurityUtils.getCurrentNickName());
bill.setUpdate_time(DateUtil.format(DateUtil.beginOfDay(DateUtil.date()), "yyyy-MM-dd"));
this.save(bill); this.save(bill);
} else { } else {
// 如果存在该记录,则更新数据 // 如果存在该记录,则更新数据

31
nlsso-server/src/main/java/org/nl/wms/database/eas/service/impl/EasOutInBillServiceImpl.java

@ -162,19 +162,19 @@ public class EasOutInBillServiceImpl extends ServiceImpl<EasOutInBillMapper, Eas
} }
/** /**
* 获取仓库信息 * 获取用户信息
*/ */
@Override @Override
public List<WarehouseInfo> getUserInfo() { public List<WarehouseInfo> getUserInfo() {
return easOutInBillMapper.getWarehouseInfo(); return easOutInBillMapper.getUserInfo();
} }
/** /**
* 获取仓库信息 * 获取组织信息
*/ */
@Override @Override
public List<WarehouseInfo> getOrganizationInfo() { public List<WarehouseInfo> getOrganizationInfo() {
return easOutInBillMapper.getWarehouseInfo(); return easOutInBillMapper.getOrganizationInfo();
} }
@ -204,7 +204,7 @@ public class EasOutInBillServiceImpl extends ServiceImpl<EasOutInBillMapper, Eas
.eq(ObjectUtil.isNotEmpty(params.getCkbm()), EasOutInBill::getCkbm, params.getCkbm()) .eq(ObjectUtil.isNotEmpty(params.getCkbm()), EasOutInBill::getCkbm, params.getCkbm())
.eq(ObjectUtil.isNotEmpty(params.getCgybm()), EasOutInBill::getCgybm, params.getCgybm()) .eq(ObjectUtil.isNotEmpty(params.getCgybm()), EasOutInBill::getCgybm, params.getCgybm())
//.eq(ObjectUtil.isNotEmpty(params.getDjzt()), EasOutInBill::getDjzt, "1".equals(params.getDjzt()) ? "提交" : "审核") //.eq(ObjectUtil.isNotEmpty(params.getDjzt()), EasOutInBill::getDjzt, "1".equals(params.getDjzt()) ? "提交" : "审核")
.eq(ObjectUtil.isNotEmpty(params.getDjzt()), EasOutInBill::getDjzt, "提交") .eq(EasOutInBill::getDjzt, "提交")
.nested(ObjectUtil.isNotEmpty(params.getFuzzy()), .nested(ObjectUtil.isNotEmpty(params.getFuzzy()),
i -> i.like(EasOutInBill::getDjid, params.getFuzzy()) i -> i.like(EasOutInBill::getDjid, params.getFuzzy())
.or() .or()
@ -604,22 +604,6 @@ public class EasOutInBillServiceImpl extends ServiceImpl<EasOutInBillMapper, Eas
} }
@Async("taskExecutor")
public void confirmDtl(String billJson, String id) {
try {
SrmMsgDto srmMsgDto = wmsToSrmService.sendWebPostData(billJson, 2);
if (srmMsgDto != null) {
if ("false".equals(srmMsgDto.getSuccess())) {
ReceiptBill bill = new ReceiptBill();
bill.setDjid(id);
bill.setShjg(srmMsgDto.getMessage());
receiptBillMapper.updateById(bill);
}
}
} catch (Exception e) {
log.error("审核失败,异常原因:" + e.toString());
}
}
/** /**
@ -650,7 +634,7 @@ public class EasOutInBillServiceImpl extends ServiceImpl<EasOutInBillMapper, Eas
} }
} }
} }
updateBills(bill, "审核成功!"); updateBills(bill, msg);
} catch (Exception e) { } catch (Exception e) {
updateBills(bill, msg); updateBills(bill, msg);
log.error("推送Eas单据失败,单据号为:[" + bill.getBillId() + "]异常原因:" + e.toString()); log.error("推送Eas单据失败,单据号为:[" + bill.getBillId() + "]异常原因:" + e.toString());
@ -701,6 +685,9 @@ public class EasOutInBillServiceImpl extends ServiceImpl<EasOutInBillMapper, Eas
} else { } else {
updateWrapper.set("shjg", msg); updateWrapper.set("shjg", msg);
} }
updateWrapper.set("update_id",SecurityUtils.getCurrentUsername());
updateWrapper.set("update_name",SecurityUtils.getCurrentNickName());
updateWrapper.set("update_time",DateUtil.format(DateUtil.beginOfDay(DateUtil.date()), "yyyy-MM-dd"));
easOutInBillMapper.update(null, updateWrapper); easOutInBillMapper.update(null, updateWrapper);
} }

7
nlsso-server/src/main/java/org/nl/wms/database/eas/service/impl/ReceiptBillServiceImpl.java

@ -66,7 +66,7 @@ public class ReceiptBillServiceImpl extends ServiceImpl<ReceiptBillMapper, Recei
if (receiptBillList != null && !receiptBillList.isEmpty()) { if (receiptBillList != null && !receiptBillList.isEmpty()) {
List<ReceiptBill> updateList = receiptBillMapper.selectList( List<ReceiptBill> updateList = receiptBillMapper.selectList(
new LambdaQueryWrapper<ReceiptBill>() new LambdaQueryWrapper<ReceiptBill>()
.in(ReceiptBill::getDjid, receiptBillList.stream().map(ReceiptBillQuery::getDjid).collect(Collectors.toList()))); .in(ReceiptBill::getFlid, receiptBillList.stream().map(ReceiptBillQuery::getDjid).collect(Collectors.toList())));
if (updateList != null && !updateList.isEmpty()) { if (updateList != null && !updateList.isEmpty()) {
Map<String, ReceiptBill> updateMap = updateList.stream() Map<String, ReceiptBill> updateMap = updateList.stream()
.collect(Collectors.toMap(ReceiptBill::getFlid, updateBill -> updateBill)); .collect(Collectors.toMap(ReceiptBill::getFlid, updateBill -> updateBill));
@ -186,8 +186,11 @@ public class ReceiptBillServiceImpl extends ServiceImpl<ReceiptBillMapper, Recei
if (receiptBill == null) { if (receiptBill == null) {
// 如果不存在该记录,则插入数据 // 如果不存在该记录,则插入数据
ReceiptBill bill = new ReceiptBill(); ReceiptBill bill = new ReceiptBill();
bill.setDjid(id); bill.setFlid(id);
bill.setShjg(srmMsgDto.getMessage()); bill.setShjg(srmMsgDto.getMessage());
bill.setUpdate_id(SecurityUtils.getCurrentUsername());
bill.setUpdate_name(SecurityUtils.getCurrentNickName());
bill.setUpdate_time(DateUtil.format(DateUtil.beginOfDay(DateUtil.date()), "yyyy-MM-dd"));
this.save(bill); this.save(bill);
} else { } else {
// 如果存在该记录,则更新数据 // 如果存在该记录,则更新数据

2
nlsso-server/src/main/java/org/nl/wms/schedule/EasBillSchedule.java

@ -112,7 +112,7 @@ public class EasBillSchedule {
* 定时清空单据 * 定时清空单据
*/ */
@Async("taskExecutor") @Async("taskExecutor")
@Scheduled(cron = "0/86400 * * * * *") //@Scheduled(cron = "0/86400 * * * * *")
public void autoDeleteTask() { public void autoDeleteTask() {
LocalDate threeMonthsAgo = LocalDate.now().minusMonths(3); LocalDate threeMonthsAgo = LocalDate.now().minusMonths(3);
String days = threeMonthsAgo.format(DateTimeFormatter.ofPattern("yyyy-MM-dd")); String days = threeMonthsAgo.format(DateTimeFormatter.ofPattern("yyyy-MM-dd"));

Loading…
Cancel
Save