bug修改
This commit is contained in:
@@ -87,6 +87,7 @@ public class QwenOcrRemoteService {
|
|||||||
|
|
||||||
// 远程服务返回:{ success: true, found: true/false, erpOrderNo: "0101398982" }
|
// 远程服务返回:{ success: true, found: true/false, erpOrderNo: "0101398982" }
|
||||||
JsonNode erpNode = rootNode.get("erpOrderNo");
|
JsonNode erpNode = rootNode.get("erpOrderNo");
|
||||||
|
|
||||||
if (erpNode == null || erpNode.isNull()) {
|
if (erpNode == null || erpNode.isNull()) {
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -201,21 +201,21 @@ public class RkInfoServiceImpl implements IRkInfoService
|
|||||||
String pcode = rkInfo.getPcode();
|
String pcode = rkInfo.getPcode();
|
||||||
|
|
||||||
// 只有当小仓 + 库位都有的时候才做这层校验
|
// 只有当小仓 + 库位都有的时候才做这层校验
|
||||||
if (StringUtils.isNotBlank(warehouseCode) && StringUtils.isNotBlank(pcode)) {
|
// if (StringUtils.isNotBlank(warehouseCode) && StringUtils.isNotBlank(pcode)) {
|
||||||
|
//
|
||||||
// 临时组装一个 PcRkInfoBatchDTO,专门给 validateWarehouseAndPcode 用
|
// // 临时组装一个 PcRkInfoBatchDTO,专门给 validateWarehouseAndPcode 用
|
||||||
PcRkInfoBatchDTO tmpDto = new PcRkInfoBatchDTO();
|
// PcRkInfoBatchDTO tmpDto = new PcRkInfoBatchDTO();
|
||||||
tmpDto.setWarehouseCode(warehouseCode);
|
// tmpDto.setWarehouseCode(warehouseCode);
|
||||||
|
//
|
||||||
List<PcRkInfoItemDTO> rkList = new ArrayList<>();
|
// List<PcRkInfoItemDTO> rkList = new ArrayList<>();
|
||||||
PcRkInfoItemDTO item = new PcRkInfoItemDTO();
|
// PcRkInfoItemDTO item = new PcRkInfoItemDTO();
|
||||||
item.setPcode(pcode);
|
// item.setPcode(pcode);
|
||||||
rkList.add(item);
|
// rkList.add(item);
|
||||||
|
//
|
||||||
tmpDto.setRkList(rkList);
|
// tmpDto.setRkList(rkList);
|
||||||
|
//
|
||||||
validateWarehouseAndPcode(tmpDto);
|
// validateWarehouseAndPcode(tmpDto);
|
||||||
}
|
// }
|
||||||
|
|
||||||
// ====== 校验通过再更新 ======
|
// ====== 校验通过再更新 ======
|
||||||
return rkInfoMapper.updateRkInfo(rkInfo);
|
return rkInfoMapper.updateRkInfo(rkInfo);
|
||||||
@@ -372,11 +372,6 @@ public class RkInfoServiceImpl implements IRkInfoService
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 新增入库单据
|
|
||||||
* @param dto
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
/**
|
/**
|
||||||
* 新增入库单据
|
* 新增入库单据
|
||||||
* @param dto
|
* @param dto
|
||||||
@@ -396,11 +391,12 @@ public class RkInfoServiceImpl implements IRkInfoService
|
|||||||
Date now = DateUtils.getNowDate();
|
Date now = DateUtils.getNowDate();
|
||||||
|
|
||||||
// ✅ 0. 只有前端传了库位编码,才做“库位属于当前小仓”的校验(否则不传库位会被拦截)
|
// ✅ 0. 只有前端传了库位编码,才做“库位属于当前小仓”的校验(否则不传库位会被拦截)
|
||||||
boolean hasPcode = list != null && list.stream()
|
/*暂时去掉校验*/
|
||||||
.anyMatch(x -> StringUtils.isNotBlank(x.getPcode()));
|
// boolean hasPcode = list != null && list.stream()
|
||||||
if (hasPcode) {
|
// .anyMatch(x -> StringUtils.isNotBlank(x.getPcode()));
|
||||||
validateWarehouseAndPcode(dto);
|
// if (hasPcode) {
|
||||||
}
|
// validateWarehouseAndPcode(dto);
|
||||||
|
// }
|
||||||
|
|
||||||
// ✅ 1. 供应计划扣减映射(同一个 gysJhId 多条明细时,realQty 累加)
|
// ✅ 1. 供应计划扣减映射(同一个 gysJhId 多条明细时,realQty 累加)
|
||||||
Map<Long, BigDecimal> realQtyMap = list.stream()
|
Map<Long, BigDecimal> realQtyMap = list.stream()
|
||||||
@@ -670,8 +666,8 @@ public class RkInfoServiceImpl implements IRkInfoService
|
|||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public int batchInsertApp(RkInfoBatchDTO dto) {
|
public int batchInsertApp(RkInfoBatchDTO dto) {
|
||||||
|
|
||||||
// ✅ 0. 小仓 + 库位一致性校验(统一用 warehouseCode)
|
// // ✅ 0. 小仓 + 库位一致性校验(统一用 warehouseCode)
|
||||||
validateWarehouseAndPcode(dto);
|
// validateWarehouseAndPcode(dto);
|
||||||
|
|
||||||
List<RkInfo> saveList = new ArrayList<>();
|
List<RkInfo> saveList = new ArrayList<>();
|
||||||
String userId = SecurityUtils.getUserId().toString();
|
String userId = SecurityUtils.getUserId().toString();
|
||||||
|
|||||||
@@ -7,9 +7,9 @@ spring:
|
|||||||
# 主库数据源
|
# 主库数据源
|
||||||
master:
|
master:
|
||||||
# url: jdbc:mysql://101.132.133.142:3306/wisdom?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
|
# url: jdbc:mysql://101.132.133.142:3306/wisdom?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
|
||||||
# url: jdbc:mysql://192.168.1.28:3306/wisdom?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
|
url: jdbc:mysql://192.168.1.28:3306/wisdom?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
|
||||||
# url: jdbc:mysql://192.168.1.192:3306/wisdom?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
|
# url: jdbc:mysql://192.168.1.192:3306/wisdom?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
|
||||||
url: jdbc:mysql://192.168.1.251:3306/wisdom?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
|
# url: jdbc:mysql://192.168.1.251:3306/wisdom?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
|
||||||
# url: jdbc:mysql://localhost:3306/wisdom?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
|
# url: jdbc:mysql://localhost:3306/wisdom?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
|
||||||
username: root
|
username: root
|
||||||
password: shzg
|
password: shzg
|
||||||
|
|||||||
@@ -1228,7 +1228,9 @@
|
|||||||
<select id="selectAllRkInfo"
|
<select id="selectAllRkInfo"
|
||||||
parameterType="com.zg.project.wisdom.domain.RkInfo"
|
parameterType="com.zg.project.wisdom.domain.RkInfo"
|
||||||
resultMap="RkInfoResult">
|
resultMap="RkInfoResult">
|
||||||
|
|
||||||
<include refid="selectRkInfoVo"/>
|
<include refid="selectRkInfoVo"/>
|
||||||
|
|
||||||
<where>
|
<where>
|
||||||
(ri.is_delete = '0' OR ri.is_delete = 0 OR ri.is_delete IS NULL)
|
(ri.is_delete = '0' OR ri.is_delete = 0 OR ri.is_delete IS NULL)
|
||||||
|
|
||||||
@@ -1242,25 +1244,29 @@
|
|||||||
#{item}
|
#{item}
|
||||||
</foreach>
|
</foreach>
|
||||||
</if>
|
</if>
|
||||||
|
|
||||||
<if test="(isChukuList == null or isChukuList.size() == 0)
|
<if test="(isChukuList == null or isChukuList.size() == 0)
|
||||||
and isChuku != null">
|
and isChuku != null">
|
||||||
AND ri.is_chuku = #{isChuku}
|
AND ri.is_chuku = #{isChuku}
|
||||||
</if>
|
</if>
|
||||||
|
|
||||||
<if test="warehouseCode != null and warehouseCode != ''">
|
<if test="warehouseCode != null and warehouseCode != ''">
|
||||||
AND ri.cangku = #{warehouseCode}
|
AND ri.cangku = #{warehouseCode}
|
||||||
</if>
|
</if>
|
||||||
|
|
||||||
<if test="parentWarehouseCode != null and parentWarehouseCode != ''">
|
<if test="parentWarehouseCode != null and parentWarehouseCode != ''">
|
||||||
AND wh.parent_warehouse_code = #{parentWarehouseCode}
|
AND wh.parent_warehouse_code = #{parentWarehouseCode}
|
||||||
</if>
|
</if>
|
||||||
|
|
||||||
<!-- Date 类型:只能判 null,别再判 '' -->
|
<!-- 入库时间 -->
|
||||||
<if test="startTime != null">
|
<if test="startTime != null">
|
||||||
AND ri.rk_time <![CDATA[ >= ]]> #{startTime}
|
AND ri.rk_time <![CDATA[ >= ]]> #{startTime}
|
||||||
</if>
|
</if>
|
||||||
<if test="endTime != null">
|
<if test="endTime != null">
|
||||||
AND ri.rk_time <![CDATA[ <= ]]> #{endTime}
|
AND ri.rk_time <![CDATA[ < ]]> DATE_ADD(#{endTime}, INTERVAL 1 SECOND)
|
||||||
</if>
|
</if>
|
||||||
|
|
||||||
|
<!-- 归还时间 -->
|
||||||
<if test="statDate != null">
|
<if test="statDate != null">
|
||||||
AND ri.return_time <![CDATA[ >= ]]> #{statDate}
|
AND ri.return_time <![CDATA[ >= ]]> #{statDate}
|
||||||
</if>
|
</if>
|
||||||
@@ -1271,16 +1277,17 @@
|
|||||||
<if test="rkType != null and rkType != ''">
|
<if test="rkType != null and rkType != ''">
|
||||||
AND ri.rk_type = #{rkType}
|
AND ri.rk_type = #{rkType}
|
||||||
</if>
|
</if>
|
||||||
|
|
||||||
<if test="wlType != null and wlType != ''">
|
<if test="wlType != null and wlType != ''">
|
||||||
AND ri.wl_type = #{wlType}
|
AND ri.wl_type = #{wlType}
|
||||||
</if>
|
</if>
|
||||||
|
|
||||||
<!-- Date 类型:只能判 null -->
|
<!-- 出库时间 -->
|
||||||
<if test="lyStartTime != null">
|
<if test="lyStartTime != null">
|
||||||
AND ri.ly_time <![CDATA[ >= ]]> #{lyStartTime}
|
AND ri.ly_time <![CDATA[ >= ]]> #{lyStartTime}
|
||||||
</if>
|
</if>
|
||||||
<if test="lyEndTime != null">
|
<if test="lyEndTime != null">
|
||||||
AND ri.ly_time <![CDATA[ <= ]]> #{lyEndTime}
|
AND ri.ly_time <![CDATA[ < ]]> DATE_ADD(#{lyEndTime}, INTERVAL 1 SECOND)
|
||||||
</if>
|
</if>
|
||||||
|
|
||||||
<if test="xmNo != null and xmNo != ''">
|
<if test="xmNo != null and xmNo != ''">
|
||||||
@@ -1323,9 +1330,15 @@
|
|||||||
AND ri.fycde_2 LIKE CONCAT('%', #{fycde2}, '%')
|
AND ri.fycde_2 LIKE CONCAT('%', #{fycde2}, '%')
|
||||||
</if>
|
</if>
|
||||||
</where>
|
</where>
|
||||||
ORDER BY ri.create_time DESC, ri.id DESC
|
|
||||||
|
<!-- ✅ 核心排序规则 -->
|
||||||
|
ORDER BY
|
||||||
|
COALESCE(ri.ly_time, ri.rk_time) DESC,
|
||||||
|
ri.id DESC
|
||||||
|
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
||||||
<select id="selectDeliveryCkList"
|
<select id="selectDeliveryCkList"
|
||||||
parameterType="com.zg.project.wisdom.domain.RkInfo"
|
parameterType="com.zg.project.wisdom.domain.RkInfo"
|
||||||
resultMap="RkInfoResult">
|
resultMap="RkInfoResult">
|
||||||
|
|||||||
Reference in New Issue
Block a user