入库如果交叉两行,写入ebs 需要两行数据都要传过去

This commit is contained in:
15066119699 2025-02-26 13:47:51 +08:00
parent eb552f8d7f
commit 8b51955e56
4 changed files with 143 additions and 71 deletions

View File

@ -223,26 +223,26 @@ public class TOngoodsshelfController extends BaseController
} }
TOngoodsshelf tOngoodsshelf = tOngoodsshelves.get(0); TOngoodsshelf tOngoodsshelf = tOngoodsshelves.get(0);
// 查询当前入库的供应商 // 查询当前入库的供应商
TBaseProvider currentInProvider = tBaseProviderService.getOne(new LambdaQueryWrapper<TBaseProvider>() // TBaseProvider currentInProvider = tBaseProviderService.getOne(new LambdaQueryWrapper<TBaseProvider>()
.eq(TBaseProvider::getRemark, "1") // .eq(TBaseProvider::getRemark, "1")
.last("limit 1")); // .last("limit 1"));
if (currentInProvider == null) { // if (currentInProvider == null) {
logger.error("没有正在入库的供应商,请开启后重试。"); // logger.error("没有正在入库的供应商,请开启后重试。");
return error("没有正在入库的供应商,请开启后重试。"); // return error("没有正在入库的供应商,请开启后重试。");
} // }
// 获取温度 // 获取温度
List<Temper> temperList = temperService.list(new LambdaQueryWrapper<Temper>() // List<Temper> temperList = temperService.list(new LambdaQueryWrapper<Temper>()
.eq(Temper::getRkId, "1")); // .eq(Temper::getRkId, "1"));
if (temperList == null || temperList.isEmpty()) { // if (temperList == null || temperList.isEmpty()) {
logger.error("获取温度错误。"); // logger.error("获取温度错误。");
return error("获取温度错误。"); // return error("获取温度错误。");
} else { // } else {
Temper currentTemper = temperList.get(0); // Temper currentTemper = temperList.get(0);
if (currentTemper.getRkDegree().compareTo(currentTemper.getMaxDegree()) >= 0) { // if (currentTemper.getRkDegree().compareTo(currentTemper.getMaxDegree()) >= 0) {
logger.error("入库温度过高。"); // logger.error("入库温度过高。");
return error("入库温度过高。"); // return error("入库温度过高。");
} // }
} // }
// 入库id // 入库id
String lotId = OrderCodeFactory.getOrderCode("RK", ""); String lotId = OrderCodeFactory.getOrderCode("RK", "");
// 创建日期 // 创建日期
@ -256,10 +256,10 @@ public class TOngoodsshelfController extends BaseController
sysUser.setUserName(tOngoodsshelf.getUserName()); sysUser.setUserName(tOngoodsshelf.getUserName());
} }
if (!Objects.equals(tOngoodsshelf.getProviderId(), currentInProvider.getProviderId())) { // if (!Objects.equals(tOngoodsshelf.getProviderId(), currentInProvider.getProviderId())) {
logger.error("不在入库状态的供应商不允许入库。"); // logger.error("不在入库状态的供应商不允许入库。");
return error("不在入库状态的供应商不允许入库。"); // return error("不在入库状态的供应商不允许入库。");
} // }
tOngoodsshelf.setAgvsts("0"); tOngoodsshelf.setAgvsts("0");
tOngoodsshelf.setTasktype("0"); tOngoodsshelf.setTasktype("0");
tOngoodsshelf.setLotId(lotId); tOngoodsshelf.setLotId(lotId);
@ -310,9 +310,10 @@ public class TOngoodsshelfController extends BaseController
TEbsOrder queryOrder = new TEbsOrder(); TEbsOrder queryOrder = new TEbsOrder();
queryOrder.setPhaSegment1(tOngoodsshelve.getWmsorderid());// 订单号 queryOrder.setPhaSegment1(tOngoodsshelve.getWmsorderid());// 订单号
queryOrder.setItemId(Integer.parseInt(tOngoodsshelve.getGoodsTypeid())); queryOrder.setItemId(Integer.parseInt(tOngoodsshelve.getGoodsTypeid()));
TEbsOrder ebsOrder = itEbsOrderService.selectTEbsOrderList(queryOrder).get(0); List<TEbsOrder> tEbsOrders = itEbsOrderService.selectTEbsOrderList(queryOrder);
// 开始写入EBS // 开始写入EBS
String paramsWmsRcvProc = JSON.toJSONString(createJsonWmsRcvProc(ebsOrder, tOngoodsshelve)); String paramsWmsRcvProc = JSON.toJSONString(createJsonWmsRcvProc(tEbsOrders, tOngoodsshelve));
logger.info("写入EBS参数{}", paramsWmsRcvProc); logger.info("写入EBS参数{}", paramsWmsRcvProc);
String resultWmsRcvProc = ""; String resultWmsRcvProc = "";
try { try {
@ -320,25 +321,25 @@ public class TOngoodsshelfController extends BaseController
logger.info("写入EBS响应结果{}", resultWmsRcvProc); logger.info("写入EBS响应结果{}", resultWmsRcvProc);
} catch (Exception e) { } catch (Exception e) {
tEbsRecordService.insertTEbsRecord(new TEbsRecord("wmsRcvProc", 2, configService.selectConfigByKey("ebs_ip"), tEbsRecordService.insertTEbsRecord(new TEbsRecord("wmsRcvProc", 2, configService.selectConfigByKey("ebs_ip"),
paramsWmsRcvProc, resultWmsRcvProc, "-1", "写入EBS", tOngoodsshelve.getGoodsid(), ebsOrder.getItemDescription(), tOngoodsshelve.getProduclotid(), tOngoodsshelve.getShelfNum())); paramsWmsRcvProc, resultWmsRcvProc, "-1", "写入EBS", tOngoodsshelve.getGoodsid(), tEbsOrders.get(0).getItemDescription(), tOngoodsshelve.getProduclotid(), tOngoodsshelve.getShelfNum()));
// 接口失败 // 接口失败
throw new RuntimeException("连接EBS失败"); throw new RuntimeException("连接EBS失败");
} }
System.out.println(resultWmsRcvProc); System.out.println(resultWmsRcvProc);
if (!JSON.parseObject(resultWmsRcvProc).getBoolean("success")) { if (!JSON.parseObject(resultWmsRcvProc).getBoolean("success")) {
tEbsRecordService.insertTEbsRecord(new TEbsRecord("wmsRcvProc", 2, configService.selectConfigByKey("ebs_ip"), tEbsRecordService.insertTEbsRecord(new TEbsRecord("wmsRcvProc", 2, configService.selectConfigByKey("ebs_ip"),
paramsWmsRcvProc, resultWmsRcvProc, "-1", "物料入库写入EBS", tOngoodsshelve.getGoodsid(), ebsOrder.getItemDescription(), tOngoodsshelve.getProduclotid(), tOngoodsshelve.getShelfNum())); paramsWmsRcvProc, resultWmsRcvProc, "-1", "物料入库写入EBS", tOngoodsshelve.getGoodsid(), tEbsOrders.get(0).getItemDescription(), tOngoodsshelve.getProduclotid(), tOngoodsshelve.getShelfNum()));
throw new RuntimeException("写入EBS失败:" + JSON.parseObject(resultWmsRcvProc).getString("msg")); throw new RuntimeException("写入EBS失败:" + JSON.parseObject(resultWmsRcvProc).getString("msg"));
} }
JSONObject resultJsonWmsRcvProc = (JSONObject) JSON.parseObject(resultWmsRcvProc).get("obj"); JSONObject resultJsonWmsRcvProc = (JSONObject) JSON.parseObject(resultWmsRcvProc).get("obj");
JSONObject dataWmsRcvProc = JSON.parseArray(resultJsonWmsRcvProc.getString("rows"), JSONObject.class).get(0); JSONObject dataWmsRcvProc = JSON.parseArray(resultJsonWmsRcvProc.getString("rows"), JSONObject.class).get(0);
if (!dataWmsRcvProc.getString("processStatus").equals("SUCCESS")) { if (!dataWmsRcvProc.getString("processStatus").equals("SUCCESS")) {
tEbsRecordService.insertTEbsRecord(new TEbsRecord("wmsRcvProc", 2, configService.selectConfigByKey("ebs_ip"), tEbsRecordService.insertTEbsRecord(new TEbsRecord("wmsRcvProc", 2, configService.selectConfigByKey("ebs_ip"),
paramsWmsRcvProc, resultWmsRcvProc, "-1", "物料入库写入EBS", tOngoodsshelve.getGoodsid(), ebsOrder.getItemDescription(), tOngoodsshelve.getProduclotid(), tOngoodsshelve.getShelfNum())); paramsWmsRcvProc, resultWmsRcvProc, "-1", "物料入库写入EBS", tOngoodsshelve.getGoodsid(), tEbsOrders.get(0).getItemDescription(), tOngoodsshelve.getProduclotid(), tOngoodsshelve.getShelfNum()));
throw new RuntimeException("写入EBS失败"); throw new RuntimeException("写入EBS失败");
} }
tEbsRecordService.insertTEbsRecord(new TEbsRecord("wmsRcvProc", 2, configService.selectConfigByKey("ebs_ip"), tEbsRecordService.insertTEbsRecord(new TEbsRecord("wmsRcvProc", 2, configService.selectConfigByKey("ebs_ip"),
paramsWmsRcvProc, resultWmsRcvProc, "0", "物料入库写入EBS", tOngoodsshelve.getGoodsid(), ebsOrder.getItemDescription(), tOngoodsshelve.getProduclotid(), tOngoodsshelve.getShelfNum())); paramsWmsRcvProc, resultWmsRcvProc, "0", "物料入库写入EBS", tOngoodsshelve.getGoodsid(), tEbsOrders.get(0).getItemDescription(), tOngoodsshelve.getProduclotid(), tOngoodsshelve.getShelfNum()));
// 用于查询检验结果 // 用于查询检验结果
tOngoodsshelve.setDecid(dataWmsRcvProc.getString("lineLocationId")); tOngoodsshelve.setDecid(dataWmsRcvProc.getString("lineLocationId"));
// 待检----待检状态无法出库 // 待检----待检状态无法出库
@ -390,13 +391,16 @@ public class TOngoodsshelfController extends BaseController
TEbsOrder queryOrder = new TEbsOrder(); TEbsOrder queryOrder = new TEbsOrder();
queryOrder.setPhaSegment1(poOrder);// 订单号 queryOrder.setPhaSegment1(poOrder);// 订单号
queryOrder.setItemId(itemId); queryOrder.setItemId(itemId);
// queryOrder.setVendorId(tOngoodsshelve.getProviderId()); logger.info("请求订单号:{}", tOngoodsshelve.getWmsorderid());
List<TEbsOrder> ebsOrders = itEbsOrderService.selectTEbsOrderList(queryOrder); List<TEbsOrder> ebsOrders = itEbsOrderService.selectTEbsOrderList(queryOrder);
logger.info("查询到的本地缓存订单:{}", JSON.toJSONString(ebsOrders)); logger.info("查询到的本地缓存订单:{}", JSON.toJSONString(ebsOrders));
if (ebsOrders.size() > 0) {// 本地数据库中缓存过 if (ebsOrders.size() > 0) {// 本地数据库中缓存过
targetOrders = ebsOrders; targetOrders = ebsOrders;
//利用java8的lanmda表达式把数组中的localNum 数量设置为null
targetOrders.forEach(ebsOrder -> ebsOrder.setLocalQuantity(null));
} else { } else {
targetOrders = getLinesAll(itemId, poOrder, token.get("access_token").toString()); targetOrders = getLinesAll(itemId, poOrder, token.get("access_token").toString());
// targetOrders =null;
logger.info("通过ebs查询到的订单信息{}", JSON.toJSONString(targetOrders)); logger.info("通过ebs查询到的订单信息{}", JSON.toJSONString(targetOrders));
if (targetOrders == null) { if (targetOrders == null) {
return "当前入库物料在EBS中没有对应订单"; return "当前入库物料在EBS中没有对应订单";
@ -414,11 +418,14 @@ public class TOngoodsshelfController extends BaseController
// 当前任务的入库数量 // 当前任务的入库数量
double tempInQuantity = tOngoodsshelve.getShelfNum().doubleValue(); double tempInQuantity = tOngoodsshelve.getShelfNum().doubleValue();
for (TEbsOrder targetOrder : targetOrders) { for (TEbsOrder targetOrder : targetOrders) {
// 获取数量 if(targetOrder.getTotalNum() == null) targetOrder.setTotalNum(0.0);
Double totalNum = targetOrder.getTotalNum();
double msQuantity = targetOrder.getMsQuantity(); double msQuantity = targetOrder.getMsQuantity();
if (msQuantity >= tempInQuantity) { if (msQuantity-totalNum >= tempInQuantity) {
// 更新本地的可接收数量 // 更新本地的可接收数量
targetOrder.setMsQuantity(msQuantity - tempInQuantity); // targetOrder.setMsQuantity(msQuantity - tempInQuantity);
targetOrder.setTotalNum(tempInQuantity + targetOrder.getTotalNum());
targetOrder.setLocalQuantity(tempInQuantity);
// 物料描述 // 物料描述
tOngoodsshelve.setGoodsname(targetOrder.getItemDescription()); tOngoodsshelve.setGoodsname(targetOrder.getItemDescription());
// 单位 // 单位
@ -429,10 +436,22 @@ public class TOngoodsshelfController extends BaseController
tOngoodsshelve.setCustomerId(targetOrder.getVendorName()); tOngoodsshelve.setCustomerId(targetOrder.getVendorName());
// 更新剩余入库数量 // 更新剩余入库数量
tempInQuantity = 0; tempInQuantity = 0;
logger.info("订单号:{},物料id{},行号:{},入库数量:{}",poOrder,itemId,targetOrder.getLocalLineNum(),tempInQuantity);
break; break;
} else { } else {
// 更新剩余入库数量
double localQuantity = msQuantity - targetOrder.getTotalNum();
tempInQuantity = tempInQuantity - localQuantity;
// 更新本地的可接收数量 // 更新本地的可接收数量
targetOrder.setMsQuantity(0.0); // targetOrder.setMsQuantity(0.0);
if(localQuantity > 0) {
targetOrder.setLocalQuantity(localQuantity);
logger.info("订单号:{},物料id{},行号:{},入库数量:{}",poOrder,itemId,targetOrder.getLocalLineNum(),localQuantity);
}
targetOrder.setTotalNum(msQuantity);
// 物料描述 // 物料描述
tOngoodsshelve.setGoodsname(targetOrder.getItemDescription()); tOngoodsshelve.setGoodsname(targetOrder.getItemDescription());
// 单位 // 单位
@ -441,12 +460,13 @@ public class TOngoodsshelfController extends BaseController
tOngoodsshelve.setGoodsTypeid(targetOrder.getItemId().toString()); tOngoodsshelve.setGoodsTypeid(targetOrder.getItemId().toString());
// 供应商名称 // 供应商名称
tOngoodsshelve.setCustomerId(targetOrder.getVendorName()); tOngoodsshelve.setCustomerId(targetOrder.getVendorName());
// 更新剩余入库数量
tempInQuantity -= msQuantity;
} }
} }
if (tempInQuantity > 0) { if (tempInQuantity > 0) {
// 报错信息入库数量超过EBS内订单数量这条订单无法同步EBS // 报错信息入库数量超过EBS内订单数量这条订单无法同步EBS
logger.error("入库数量超过EBS内订单数量。这条订单无法同步EBS==>>{}",tempInQuantity);
return "入库数量超过EBS内订单可接收数量。</br>这条订单无法同步EBS。"; return "入库数量超过EBS内订单可接收数量。</br>这条订单无法同步EBS。";
} else { } else {
for (TEbsOrder targetOrder : targetOrders) { for (TEbsOrder targetOrder : targetOrders) {
@ -749,7 +769,7 @@ public class TOngoodsshelfController extends BaseController
* 创建参数Json(写入ebs) * 创建参数Json(写入ebs)
* @return * @return
*/ */
public JSONObject createJsonWmsRcvProc(TEbsOrder dataGetAll, TOngoodsshelf tOngoodsshelve) throws ParseException { public JSONObject createJsonWmsRcvProc(List<TEbsOrder> dataGetAlls, TOngoodsshelf tOngoodsshelve) throws ParseException {
// 创建系统参数 // 创建系统参数
JSONObject systemParams = new JSONObject(); JSONObject systemParams = new JSONObject();
systemParams.put("requestId", new SimpleDateFormat("yyyyMMddHHmmssSSS").format(new Date())); systemParams.put("requestId", new SimpleDateFormat("yyyyMMddHHmmssSSS").format(new Date()));
@ -766,7 +786,10 @@ public class TOngoodsshelfController extends BaseController
// 创建查询参数 // 创建查询参数
JSONObject baseQueryParams = new JSONObject(); JSONObject baseQueryParams = new JSONObject();
JSONArray jsonArray = new JSONArray();
for(TEbsOrder dataGetAll : dataGetAlls) {
// 创建数据 // 创建数据
if(dataGetAll.getLocalQuantity() != null) {
JSONObject businessData = new JSONObject(); JSONObject businessData = new JSONObject();
businessData.put("organizationId", configService.selectConfigByKey("organizationId")); businessData.put("organizationId", configService.selectConfigByKey("organizationId"));
businessData.put("poHeaderId", dataGetAll.getPoHeaderId()); businessData.put("poHeaderId", dataGetAll.getPoHeaderId());
@ -774,7 +797,7 @@ public class TOngoodsshelfController extends BaseController
businessData.put("lineLocationId", dataGetAll.getLineLocationId()); businessData.put("lineLocationId", dataGetAll.getLineLocationId());
businessData.put("poDistributionId", dataGetAll.getPoDistributionId()); businessData.put("poDistributionId", dataGetAll.getPoDistributionId());
businessData.put("itemId", dataGetAll.getItemId()); businessData.put("itemId", dataGetAll.getItemId());
businessData.put("quantity", tOngoodsshelve.getShelfNum()); businessData.put("quantity", dataGetAll.getLocalQuantity());
businessData.put("subInventory", ""); businessData.put("subInventory", "");
// businessData.put("subInventory", tOngoodsshelve.getWhseloc()); // businessData.put("subInventory", tOngoodsshelve.getWhseloc());
businessData.put("locatorId", null); businessData.put("locatorId", null);
@ -786,8 +809,10 @@ public class TOngoodsshelfController extends BaseController
businessData.put("expirationDate", new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new SimpleDateFormat("yyyyMMdd").parse("20" + tOngoodsshelve.getExpirationDate()))); businessData.put("expirationDate", new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new SimpleDateFormat("yyyyMMdd").parse("20" + tOngoodsshelve.getExpirationDate())));
businessData.put("OriginationDate", new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new SimpleDateFormat("yyyyMMdd").parse("20" + tOngoodsshelve.getProductionDate()))); businessData.put("OriginationDate", new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new SimpleDateFormat("yyyyMMdd").parse("20" + tOngoodsshelve.getProductionDate())));
JSONArray jsonArray = new JSONArray();
jsonArray.add(businessData); jsonArray.add(businessData);
}
}
JSONObject result = new JSONObject(); JSONObject result = new JSONObject();
result.put("systemParams", systemParams); result.put("systemParams", systemParams);

View File

@ -22,6 +22,11 @@
<!-- 日志最大的历史 60天 --> <!-- 日志最大的历史 60天 -->
<maxHistory>60</maxHistory> <maxHistory>60</maxHistory>
</rollingPolicy> </rollingPolicy>
<!-- 文件大小触发滚动 -->
<triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
<!-- 设置文件的最大大小(比如 10MB -->
<maxFileSize>10MB</maxFileSize>
</triggeringPolicy>
<encoder> <encoder>
<pattern>${log.pattern}</pattern> <pattern>${log.pattern}</pattern>
</encoder> </encoder>
@ -44,6 +49,11 @@
<!-- 日志最大的历史 60天 --> <!-- 日志最大的历史 60天 -->
<maxHistory>60</maxHistory> <maxHistory>60</maxHistory>
</rollingPolicy> </rollingPolicy>
<!-- 文件大小触发滚动 -->
<triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
<!-- 设置文件的最大大小(比如 10MB -->
<maxFileSize>10MB</maxFileSize>
</triggeringPolicy>
<encoder> <encoder>
<pattern>${log.pattern}</pattern> <pattern>${log.pattern}</pattern>
</encoder> </encoder>
@ -66,6 +76,11 @@
<!-- 日志最大的历史 60天 --> <!-- 日志最大的历史 60天 -->
<maxHistory>60</maxHistory> <maxHistory>60</maxHistory>
</rollingPolicy> </rollingPolicy>
<!-- 文件大小触发滚动 -->
<triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
<!-- 设置文件的最大大小(比如 10MB -->
<maxFileSize>10MB</maxFileSize>
</triggeringPolicy>
<encoder> <encoder>
<pattern>${log.pattern}</pattern> <pattern>${log.pattern}</pattern>
</encoder> </encoder>

View File

@ -208,10 +208,34 @@ public class TEbsOrder extends BaseEntity {
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date createDate; private Date createDate;
@Excel(name = "本地行号")
@TableField("localLineNum") @TableField("localLineNum")
private Integer localLineNum; private Integer localLineNum;
@TableField("total_num")
private Double totalNum;
//本次入库数量
@TableField(" local_quantity")
private Double localQuantity;
public Double getLocalQuantity() {
return localQuantity;
}
public void setLocalQuantity(Double localQuantity) {
this.localQuantity = localQuantity;
}
public Double getTotalNum() {
return totalNum;
}
public void setTotalNum(Double totalNum) {
this.totalNum = totalNum;
}
public Integer getLocalLineNum() { public Integer getLocalLineNum() {
return localLineNum; return localLineNum;
} }

View File

@ -33,6 +33,8 @@
<result property="createTime" column="CREATE_TIME" /> <result property="createTime" column="CREATE_TIME" />
<result property="updateTime" column="UPDATE_TIME" /> <result property="updateTime" column="UPDATE_TIME" />
<result property="localLineNum" column="local_line_num" /> <result property="localLineNum" column="local_line_num" />
<result property="totalNum" column="total_num" />
<result property="localQuantity" column="local_quantity" />
</resultMap> </resultMap>
<sql id="selectTEbsOrderALl"> <sql id="selectTEbsOrderALl">
@ -46,7 +48,7 @@
<if test="itemId != null"> and itemId = #{itemId}</if> <if test="itemId != null"> and itemId = #{itemId}</if>
<if test="localLineNum != null"> and local_line_num = #{localLineNum}</if> <if test="localLineNum != null"> and local_line_num = #{localLineNum}</if>
</where> </where>
order by dueDate; order by local_line_num ASC;
</select> </select>
<insert id="insertTEbsOrder" parameterType="TEbsOrder"> <insert id="insertTEbsOrder" parameterType="TEbsOrder">
@ -81,6 +83,8 @@
<if test="createDate != null">createDate,</if> <if test="createDate != null">createDate,</if>
<if test="createTime != null">CREATE_TIME,</if> <if test="createTime != null">CREATE_TIME,</if>
<if test="localLineNum != null">local_line_num,</if> <if test="localLineNum != null">local_line_num,</if>
<if test="totalNum != null">total_num,</if>
<if test="localQuantity != null">local_quantity,</if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="phaSegment1 != null">#{phaSegment1},</if> <if test="phaSegment1 != null">#{phaSegment1},</if>
@ -111,8 +115,9 @@
<if test="dueDate != null">#{dueDate},</if> <if test="dueDate != null">#{dueDate},</if>
<if test="createDate != null">#{createDate},</if> <if test="createDate != null">#{createDate},</if>
<if test="createTime != null">#{createTime},</if> <if test="createTime != null">#{createTime},</if>
<if test="createTime != null">#{createTime},</if>
<if test="localLineNum != null">#{localLineNum},</if> <if test="localLineNum != null">#{localLineNum},</if>
<if test="totalNum != null">#{totalNum},</if>
<if test="localQuantity != null">#{localQuantity},</if>
</trim> </trim>
</insert> </insert>
@ -143,10 +148,13 @@
<if test="lotControl != null">lotControl = #{lotControl},</if> <if test="lotControl != null">lotControl = #{lotControl},</if>
<if test="checkPriority != null">checkPriority = #{checkPriority},</if> <if test="checkPriority != null">checkPriority = #{checkPriority},</if>
<if test="updateTime != null">UPDATE_TIME = #{updateTime},</if> <if test="updateTime != null">UPDATE_TIME = #{updateTime},</if>
<if test="totalNum != null">total_num = #{totalNum},</if>
<if test="localQuantity != null">local_quantity = #{localQuantity},</if>
</trim> </trim>
<where> <where>
phaSegment1 = #{phaSegment1} and itemId = #{itemId} and dueDate = #{dueDate} phaSegment1 = #{phaSegment1} and itemId = #{itemId}
<if test="localLineNum != null">and local_line_num = #{localLineNum}</if> <if test="dueDate != null"> and dueDate = #{dueDate}</if>
<if test="localLineNum != null"> and local_line_num = #{localLineNum}</if>
</where> </where>
</update> </update>