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