1. 更新入库接口,在入库任务生成后,接着调用ebs同步入库数量
This commit is contained in:
parent
393a1ba534
commit
c55d46329c
|
|
@ -221,6 +221,7 @@ public class TOngoodsshelfController extends BaseController
|
||||||
logger.error("提交入库的数据为空");
|
logger.error("提交入库的数据为空");
|
||||||
return error();
|
return error();
|
||||||
}
|
}
|
||||||
|
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")
|
||||||
|
|
@ -248,41 +249,37 @@ public class TOngoodsshelfController extends BaseController
|
||||||
Date date = new Date();
|
Date date = new Date();
|
||||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||||
SysUser sysUser = new SysUser();
|
SysUser sysUser = new SysUser();
|
||||||
if (StringUtils.isEmpty(tOngoodsshelves.get(0).getUserName())) {
|
if (StringUtils.isEmpty(tOngoodsshelf.getUserName())) {
|
||||||
// 获取用户名
|
// 获取用户名
|
||||||
sysUser = ShiroUtils.getCurrentUser();
|
sysUser = ShiroUtils.getCurrentUser();
|
||||||
} else {
|
} else {
|
||||||
sysUser.setUserName(tOngoodsshelves.get(0).getUserName());
|
sysUser.setUserName(tOngoodsshelf.getUserName());
|
||||||
}
|
}
|
||||||
boolean providerValidation = true;
|
|
||||||
for (TOngoodsshelf s:
|
if (!Objects.equals(tOngoodsshelf.getProviderId(), currentInProvider.getProviderId())) {
|
||||||
tOngoodsshelves) {
|
|
||||||
if (!Objects.equals(s.getProviderId(), currentInProvider.getProviderId())) {
|
|
||||||
providerValidation = false;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
s.setAgvsts("0");
|
|
||||||
s.setTasktype("0");
|
|
||||||
s.setLotId(lotId);
|
|
||||||
s.setOrderId(initOrderId());
|
|
||||||
s.setCreateDate(sdf.format(date));
|
|
||||||
s.setInstatus("0");
|
|
||||||
s.setUserName(sysUser.getUserName());
|
|
||||||
// 设置子库ID
|
|
||||||
s.setWhseloc("121-108");
|
|
||||||
}
|
|
||||||
if (!providerValidation) {
|
|
||||||
logger.error("不在入库状态的供应商不允许入库。");
|
logger.error("不在入库状态的供应商不允许入库。");
|
||||||
return error("不在入库状态的供应商不允许入库。");
|
return error("不在入库状态的供应商不允许入库。");
|
||||||
}
|
}
|
||||||
// 开始对接ebs
|
tOngoodsshelf.setAgvsts("0");
|
||||||
String ebsCongfirmResult = ebsConfirm(tOngoodsshelves);
|
tOngoodsshelf.setTasktype("0");
|
||||||
|
tOngoodsshelf.setLotId(lotId);
|
||||||
|
tOngoodsshelf.setOrderId(initOrderId());
|
||||||
|
tOngoodsshelf.setCreateDate(sdf.format(date));
|
||||||
|
tOngoodsshelf.setInstatus("0");
|
||||||
|
tOngoodsshelf.setUserName(sysUser.getUserName());
|
||||||
|
// 设置子库ID
|
||||||
|
tOngoodsshelf.setWhseloc("121-108");
|
||||||
|
|
||||||
|
// 查询 缓存ebs订单
|
||||||
|
String ebsCongfirmResult = ebsConfirm(tOngoodsshelf);
|
||||||
if (StringUtils.isNotEmpty(ebsCongfirmResult)) {
|
if (StringUtils.isNotEmpty(ebsCongfirmResult)) {
|
||||||
return error(ebsCongfirmResult);
|
return error(ebsCongfirmResult);
|
||||||
}
|
}
|
||||||
if (tOngoodsshelfService.insertTOngoodsshelfValues(tOngoodsshelves) < 1) {
|
if (tOngoodsshelfService.insertTOngoodsshelf(tOngoodsshelf) < 1) {
|
||||||
return error("生成入库任务失败");
|
return error("生成入库任务失败");
|
||||||
}
|
}
|
||||||
|
// 写入ebs
|
||||||
|
writeToEbs(tOngoodsshelf);
|
||||||
return success("生成入库任务成功");
|
return success("生成入库任务成功");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -294,15 +291,22 @@ public class TOngoodsshelfController extends BaseController
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
public AjaxResult wmsRcvProc(@RequestBody List<TOngoodsshelf> tOngoodsshelves) throws Exception {
|
public AjaxResult wmsRcvProc(@RequestBody List<TOngoodsshelf> tOngoodsshelves) throws Exception {
|
||||||
logger.info("接收写入参数:{}", tOngoodsshelves.toString());
|
logger.info("接收写入参数:{}", tOngoodsshelves.toString());
|
||||||
|
writeToEbs(tOngoodsshelves.get(0));
|
||||||
|
|
||||||
|
return success("写入EBS成功");
|
||||||
|
}
|
||||||
|
|
||||||
|
private void writeToEbs(TOngoodsshelf tOngoodsshelve) throws Exception{
|
||||||
// 查询任务
|
// 查询任务
|
||||||
TOngoodsshelf queryOnTask = new TOngoodsshelf();
|
// TOngoodsshelf queryOnTask = new TOngoodsshelf();
|
||||||
queryOnTask.setInstand(tOngoodsshelves.get(0).getInstand());
|
// queryOnTask.setInstand(tOngoodsshelve.getInstand());
|
||||||
queryOnTask.setInstatus(tOngoodsshelves.get(0).getInstatus());
|
// queryOnTask.setInstatus(tOngoodsshelve.getInstatus());
|
||||||
List<TOngoodsshelf> tOngoodsshelvesNew = tOngoodsshelfService.selectTOngoodsshelfList(queryOnTask);
|
// List<TOngoodsshelf> tOngoodsshelvesNew = tOngoodsshelfService.selectTOngoodsshelfList(queryOnTask);
|
||||||
// 获取token
|
// 获取token
|
||||||
JSONObject token = JSON.parseObject(HttpUtils.httpPostJson(configService.selectConfigByKey("token_ip"), "", ""));
|
JSONObject token = JSON.parseObject(HttpUtils.httpPostJson(configService.selectConfigByKey("token_ip"), "", ""));
|
||||||
for (TOngoodsshelf tOngoodsshelve : tOngoodsshelvesNew) {
|
// for (TOngoodsshelf tOngoodsshelve : tOngoodsshelvesNew) {
|
||||||
// 获取本地缓存过的订单信息
|
// 获取本地缓存过的订单信息
|
||||||
|
//TODO 确定唯一一条数据
|
||||||
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()));
|
||||||
|
|
@ -318,20 +322,20 @@ public class TOngoodsshelfController extends BaseController
|
||||||
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(), ebsOrder.getItemDescription(), tOngoodsshelve.getProduclotid(), tOngoodsshelve.getShelfNum()));
|
||||||
// 接口失败
|
// 接口失败
|
||||||
return error("连接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(), ebsOrder.getItemDescription(), tOngoodsshelve.getProduclotid(), tOngoodsshelve.getShelfNum()));
|
||||||
return error("写入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(), ebsOrder.getItemDescription(), tOngoodsshelve.getProduclotid(), tOngoodsshelve.getShelfNum()));
|
||||||
return error("写入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(), ebsOrder.getItemDescription(), tOngoodsshelve.getProduclotid(), tOngoodsshelve.getShelfNum()));
|
||||||
|
|
@ -341,24 +345,21 @@ public class TOngoodsshelfController extends BaseController
|
||||||
tOngoodsshelve.setAccStatus("5");
|
tOngoodsshelve.setAccStatus("5");
|
||||||
// 更新信息
|
// 更新信息
|
||||||
tOngoodsshelfService.updateTOngoodsshelf(tOngoodsshelve);
|
tOngoodsshelfService.updateTOngoodsshelf(tOngoodsshelve);
|
||||||
}
|
// }
|
||||||
|
|
||||||
return success("写入EBS成功");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 对接ebs
|
* 对接ebs
|
||||||
*
|
*
|
||||||
* @param tOngoodsshelves
|
* @param tOngoodsshelve
|
||||||
* @return
|
* @return
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
public String ebsConfirm(List<TOngoodsshelf> tOngoodsshelves) {
|
public String ebsConfirm(TOngoodsshelf tOngoodsshelve) {
|
||||||
try {
|
try {
|
||||||
// 获取token
|
// 获取token
|
||||||
JSONObject token = JSON.parseObject(HttpUtils.httpPostJson(configService.selectConfigByKey("token_ip"), "", ""));
|
JSONObject token = JSON.parseObject(HttpUtils.httpPostJson(configService.selectConfigByKey("token_ip"), "", ""));
|
||||||
// 查询物料ID
|
// 查询物料ID
|
||||||
for (TOngoodsshelf tOngoodsshelve : tOngoodsshelves) {
|
|
||||||
// 物料id
|
// 物料id
|
||||||
int itemId;
|
int itemId;
|
||||||
// 先查询物料表,根据当前的物料编码
|
// 先查询物料表,根据当前的物料编码
|
||||||
|
|
@ -403,6 +404,8 @@ public class TOngoodsshelfController extends BaseController
|
||||||
// 插入ebsOrder表
|
// 插入ebsOrder表
|
||||||
for (TEbsOrder targetOrder : targetOrders) {
|
for (TEbsOrder targetOrder : targetOrders) {
|
||||||
targetOrder.setCreateDate(new Date());
|
targetOrder.setCreateDate(new Date());
|
||||||
|
targetOrder.setCreateTime(new Date());
|
||||||
|
targetOrder.setUpdateTime(new Date());
|
||||||
itEbsOrderService.insertTEbsOrder(targetOrder);
|
itEbsOrderService.insertTEbsOrder(targetOrder);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -446,10 +449,10 @@ public class TOngoodsshelfController extends BaseController
|
||||||
} else {
|
} else {
|
||||||
for (TEbsOrder targetOrder : targetOrders) {
|
for (TEbsOrder targetOrder : targetOrders) {
|
||||||
// 更新EBS缓存的订单信息
|
// 更新EBS缓存的订单信息
|
||||||
|
//TODO 两条数据 怎么区分???
|
||||||
itEbsOrderService.updateTEbsOrder(targetOrder);
|
itEbsOrderService.updateTEbsOrder(targetOrder);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
logger.error("出现异常:{}", JSON.toJSONString(e));
|
logger.error("出现异常:{}", JSON.toJSONString(e));
|
||||||
return "出现异常";
|
return "出现异常";
|
||||||
|
|
|
||||||
|
|
@ -30,6 +30,8 @@
|
||||||
<result property="checkPriority" column="checkPriority" />
|
<result property="checkPriority" column="checkPriority" />
|
||||||
<result property="dueDate" column="dueDate" />
|
<result property="dueDate" column="dueDate" />
|
||||||
<result property="createDate" column="createDate" />
|
<result property="createDate" column="createDate" />
|
||||||
|
<result property="createTime" column="CREATE_TIME" />
|
||||||
|
<result property="updateTime" column="UPDATE_TIME" />
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<sql id="selectTEbsOrderALl">
|
<sql id="selectTEbsOrderALl">
|
||||||
|
|
@ -75,6 +77,7 @@
|
||||||
<if test="checkPriority != null">checkPriority,</if>
|
<if test="checkPriority != null">checkPriority,</if>
|
||||||
<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">CREATE_TIME,</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>
|
||||||
|
|
@ -104,9 +107,41 @@
|
||||||
<if test="checkPriority != null">#{checkPriority},</if>
|
<if test="checkPriority != null">#{checkPriority},</if>
|
||||||
<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>
|
||||||
</trim>
|
</trim>
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
|
<update id="updateById" parameterType="TEbsOrder">
|
||||||
|
update t_ebs_order
|
||||||
|
<trim prefix="SET" suffixOverrides=",">
|
||||||
|
<if test="shipmentNum != null">shipmentNum = #{shipmentNum},</if>
|
||||||
|
<if test="distributionNum != null">distributionNum = #{distributionNum},</if>
|
||||||
|
<if test="supplyTypeCode != null">supplyTypeCode = #{supplyTypeCode},</if>
|
||||||
|
<if test="msQuantity != null">msQuantity = #{msQuantity},</if>
|
||||||
|
<if test="poDistributionId != null">poDistributionId = #{poDistributionId},</if>
|
||||||
|
<if test="poHeaderId != null">poHeaderId = #{poHeaderId},</if>
|
||||||
|
<if test="poLineId != null">poLineId = #{poLineId},</if>
|
||||||
|
<if test="lineNum != null">lineNum = #{lineNum},</if>
|
||||||
|
<if test="orgId != null">orgId = #{orgId},</if>
|
||||||
|
<if test="shipToOrganizationId != null">shipToOrganizationId = #{shipToOrganizationId},</if>
|
||||||
|
<if test="itemDescription != null">itemDescription = #{itemDescription},</if>
|
||||||
|
<if test="unitMeasLookupCode != null">unitMeasLookupCode = #{unitMeasLookupCode},</if>
|
||||||
|
<if test="unitPrice != null">unitPrice = #{unitPrice},</if>
|
||||||
|
<if test="quantity != null">quantity = #{quantity},</if>
|
||||||
|
<if test="quantityReceived != null">quantityReceived = #{quantityReceived},</if>
|
||||||
|
<if test="closedCode != null">closedCode = #{closedCode},</if>
|
||||||
|
<if test="lineLocationId != null">lineLocationId = #{lineLocationId},</if>
|
||||||
|
<if test="vendorId != null">vendorId = #{vendorId},</if>
|
||||||
|
<if test="vendorName != null">vendorName = #{vendorName},</if>
|
||||||
|
<if test="wipEntityId != null">wipEntityId = #{wipEntityId},</if>
|
||||||
|
<if test="receivingRoutingId != null">receivingRoutingId = #{receivingRoutingId},</if>
|
||||||
|
<if test="lotControl != null">lotControl = #{lotControl},</if>
|
||||||
|
<if test="checkPriority != null">checkPriority = #{checkPriority},</if>
|
||||||
|
<if test="updateTime != null">UPDATE_TIME = #{updateTime},</if>
|
||||||
|
</trim>
|
||||||
|
where id = #{id}
|
||||||
|
</update>
|
||||||
|
|
||||||
<update id="updateTEbsOrder" parameterType="TEbsOrder">
|
<update id="updateTEbsOrder" parameterType="TEbsOrder">
|
||||||
update t_ebs_order
|
update t_ebs_order
|
||||||
<trim prefix="SET" suffixOverrides=",">
|
<trim prefix="SET" suffixOverrides=",">
|
||||||
|
|
@ -133,7 +168,7 @@
|
||||||
<if test="receivingRoutingId != null">receivingRoutingId = #{receivingRoutingId},</if>
|
<if test="receivingRoutingId != null">receivingRoutingId = #{receivingRoutingId},</if>
|
||||||
<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="createDate != null">createDate = #{createDate},</if>
|
<if test="updateTime != null">UPDATE_TIME = #{updateTime},</if>
|
||||||
</trim>
|
</trim>
|
||||||
where phaSegment1 = #{phaSegment1} and itemId = #{itemId} and dueDate = #{dueDate}
|
where phaSegment1 = #{phaSegment1} and itemId = #{itemId} and dueDate = #{dueDate}
|
||||||
</update>
|
</update>
|
||||||
|
|
|
||||||
|
|
@ -18,10 +18,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<result property="goodsName" column="goods_name" />
|
<result property="goodsName" column="goods_name" />
|
||||||
<result property="lotId" column="lot_id" />
|
<result property="lotId" column="lot_id" />
|
||||||
<result property="quantity" column="quantity" />
|
<result property="quantity" column="quantity" />
|
||||||
|
<result property="createTime" column="CREATE_TIME" />
|
||||||
|
<result property="updateTime" column="UPDATE_TIME" />
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<sql id="selectTEbsRecordVo">
|
<sql id="selectTEbsRecordVo">
|
||||||
select record_id, method_name, api_id, api_url, api_param, result, status, description, operate_time, goods_id, goods_name, lot_id, quantity from t_ebs_record
|
select record_id, method_name, api_id, api_url, api_param, result, status, description, operate_time, goods_id, goods_name, lot_id, quantity,CREATE_TIME,UPDATE_TIME from t_ebs_record
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<select id="selectTEbsRecordList" parameterType="TEbsRecord" resultMap="TEbsRecordResult">
|
<select id="selectTEbsRecordList" parameterType="TEbsRecord" resultMap="TEbsRecordResult">
|
||||||
|
|
@ -62,6 +64,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="goodsName != null">goods_name,</if>
|
<if test="goodsName != null">goods_name,</if>
|
||||||
<if test="lotId != null">lot_id,</if>
|
<if test="lotId != null">lot_id,</if>
|
||||||
<if test="quantity != null">quantity,</if>
|
<if test="quantity != null">quantity,</if>
|
||||||
|
<if test="createTime != null">CREATE_TIME,</if>
|
||||||
operate_time,
|
operate_time,
|
||||||
</trim>
|
</trim>
|
||||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
|
|
@ -76,6 +79,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="goodsName != null">#{goodsName},</if>
|
<if test="goodsName != null">#{goodsName},</if>
|
||||||
<if test="lotId != null">#{lotId},</if>
|
<if test="lotId != null">#{lotId},</if>
|
||||||
<if test="quantity != null">#{quantity},</if>
|
<if test="quantity != null">#{quantity},</if>
|
||||||
|
<if test="createTime != null">#{createTime},</if>
|
||||||
now()
|
now()
|
||||||
</trim>
|
</trim>
|
||||||
</insert>
|
</insert>
|
||||||
|
|
@ -94,6 +98,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="goodsName != null">goods_name = #{goodsName},</if>
|
<if test="goodsName != null">goods_name = #{goodsName},</if>
|
||||||
<if test="lotId != null">lot_id = #{lotId},</if>
|
<if test="lotId != null">lot_id = #{lotId},</if>
|
||||||
<if test="quantity != null">quantity = #{quantity},</if>
|
<if test="quantity != null">quantity = #{quantity},</if>
|
||||||
|
<if test="updateTime != null">UPDATE_TIME = #{updateTime},</if>
|
||||||
operate_time = now(),
|
operate_time = now(),
|
||||||
</trim>
|
</trim>
|
||||||
where record_id = #{recordId}
|
where record_id = #{recordId}
|
||||||
|
|
|
||||||
|
|
@ -151,6 +151,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="towhseloc != null">TOWHSELOC,</if>
|
<if test="towhseloc != null">TOWHSELOC,</if>
|
||||||
<if test="outstatus != null">OUTSTATUS,</if>
|
<if test="outstatus != null">OUTSTATUS,</if>
|
||||||
<if test="userName != null">USERNAME,</if>
|
<if test="userName != null">USERNAME,</if>
|
||||||
|
<if test="createTime != null">CREATE_TIME,</if>
|
||||||
</trim>
|
</trim>
|
||||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
<if test="pickingid != null and pickingid != ''">#{pickingid},</if>
|
<if test="pickingid != null and pickingid != ''">#{pickingid},</if>
|
||||||
|
|
@ -191,6 +192,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="towhseloc != null">#{towhseloc},</if>
|
<if test="towhseloc != null">#{towhseloc},</if>
|
||||||
<if test="outstatus != null">#{outstatus},</if>
|
<if test="outstatus != null">#{outstatus},</if>
|
||||||
<if test="userName != null">#{userName},</if>
|
<if test="userName != null">#{userName},</if>
|
||||||
|
<if test="createTime != null">#{createTime},</if>
|
||||||
</trim>
|
</trim>
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
|
|
@ -234,6 +236,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="towhseloc != null">TOWHSELOC = #{towhseloc},</if>
|
<if test="towhseloc != null">TOWHSELOC = #{towhseloc},</if>
|
||||||
<if test="outstatus != null">OUTSTATUS = #{outstatus},</if>
|
<if test="outstatus != null">OUTSTATUS = #{outstatus},</if>
|
||||||
<if test="userName != null">USERNAME = #{userName},</if>
|
<if test="userName != null">USERNAME = #{userName},</if>
|
||||||
|
<if test="createTime != null">CREATE_TIME = #{createTime},</if>
|
||||||
</trim>
|
</trim>
|
||||||
where PICKINGID = #{pickingid}
|
where PICKINGID = #{pickingid}
|
||||||
</update>
|
</update>
|
||||||
|
|
|
||||||
|
|
@ -30,6 +30,8 @@
|
||||||
<result property="checkPriority" column="checkPriority" />
|
<result property="checkPriority" column="checkPriority" />
|
||||||
<result property="dueDate" column="dueDate" />
|
<result property="dueDate" column="dueDate" />
|
||||||
<result property="createDate" column="createDate" />
|
<result property="createDate" column="createDate" />
|
||||||
|
<result property="createTime" column="CREATE_TIME" />
|
||||||
|
<result property="updateTime" column="UPDATE_TIME" />
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<sql id="selectTEbsOrderALl">
|
<sql id="selectTEbsOrderALl">
|
||||||
|
|
@ -75,6 +77,7 @@
|
||||||
<if test="checkPriority != null">checkPriority,</if>
|
<if test="checkPriority != null">checkPriority,</if>
|
||||||
<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">CREATE_TIME,</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>
|
||||||
|
|
@ -104,9 +107,41 @@
|
||||||
<if test="checkPriority != null">#{checkPriority},</if>
|
<if test="checkPriority != null">#{checkPriority},</if>
|
||||||
<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>
|
||||||
</trim>
|
</trim>
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
|
<update id="updateById" parameterType="TEbsOrder">
|
||||||
|
update t_ebs_order
|
||||||
|
<trim prefix="SET" suffixOverrides=",">
|
||||||
|
<if test="shipmentNum != null">shipmentNum = #{shipmentNum},</if>
|
||||||
|
<if test="distributionNum != null">distributionNum = #{distributionNum},</if>
|
||||||
|
<if test="supplyTypeCode != null">supplyTypeCode = #{supplyTypeCode},</if>
|
||||||
|
<if test="msQuantity != null">msQuantity = #{msQuantity},</if>
|
||||||
|
<if test="poDistributionId != null">poDistributionId = #{poDistributionId},</if>
|
||||||
|
<if test="poHeaderId != null">poHeaderId = #{poHeaderId},</if>
|
||||||
|
<if test="poLineId != null">poLineId = #{poLineId},</if>
|
||||||
|
<if test="lineNum != null">lineNum = #{lineNum},</if>
|
||||||
|
<if test="orgId != null">orgId = #{orgId},</if>
|
||||||
|
<if test="shipToOrganizationId != null">shipToOrganizationId = #{shipToOrganizationId},</if>
|
||||||
|
<if test="itemDescription != null">itemDescription = #{itemDescription},</if>
|
||||||
|
<if test="unitMeasLookupCode != null">unitMeasLookupCode = #{unitMeasLookupCode},</if>
|
||||||
|
<if test="unitPrice != null">unitPrice = #{unitPrice},</if>
|
||||||
|
<if test="quantity != null">quantity = #{quantity},</if>
|
||||||
|
<if test="quantityReceived != null">quantityReceived = #{quantityReceived},</if>
|
||||||
|
<if test="closedCode != null">closedCode = #{closedCode},</if>
|
||||||
|
<if test="lineLocationId != null">lineLocationId = #{lineLocationId},</if>
|
||||||
|
<if test="vendorId != null">vendorId = #{vendorId},</if>
|
||||||
|
<if test="vendorName != null">vendorName = #{vendorName},</if>
|
||||||
|
<if test="wipEntityId != null">wipEntityId = #{wipEntityId},</if>
|
||||||
|
<if test="receivingRoutingId != null">receivingRoutingId = #{receivingRoutingId},</if>
|
||||||
|
<if test="lotControl != null">lotControl = #{lotControl},</if>
|
||||||
|
<if test="checkPriority != null">checkPriority = #{checkPriority},</if>
|
||||||
|
<if test="updateTime != null">UPDATE_TIME = #{updateTime},</if>
|
||||||
|
</trim>
|
||||||
|
where id = #{id}
|
||||||
|
</update>
|
||||||
|
|
||||||
<update id="updateTEbsOrder" parameterType="TEbsOrder">
|
<update id="updateTEbsOrder" parameterType="TEbsOrder">
|
||||||
update t_ebs_order
|
update t_ebs_order
|
||||||
<trim prefix="SET" suffixOverrides=",">
|
<trim prefix="SET" suffixOverrides=",">
|
||||||
|
|
@ -133,7 +168,7 @@
|
||||||
<if test="receivingRoutingId != null">receivingRoutingId = #{receivingRoutingId},</if>
|
<if test="receivingRoutingId != null">receivingRoutingId = #{receivingRoutingId},</if>
|
||||||
<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="createDate != null">createDate = #{createDate},</if>
|
<if test="updateTime != null">UPDATE_TIME = #{updateTime},</if>
|
||||||
</trim>
|
</trim>
|
||||||
where phaSegment1 = #{phaSegment1} and itemId = #{itemId} and dueDate = #{dueDate}
|
where phaSegment1 = #{phaSegment1} and itemId = #{itemId} and dueDate = #{dueDate}
|
||||||
</update>
|
</update>
|
||||||
|
|
|
||||||
|
|
@ -18,10 +18,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<result property="goodsName" column="goods_name" />
|
<result property="goodsName" column="goods_name" />
|
||||||
<result property="lotId" column="lot_id" />
|
<result property="lotId" column="lot_id" />
|
||||||
<result property="quantity" column="quantity" />
|
<result property="quantity" column="quantity" />
|
||||||
|
<result property="createTime" column="CREATE_TIME" />
|
||||||
|
<result property="updateTime" column="UPDATE_TIME" />
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<sql id="selectTEbsRecordVo">
|
<sql id="selectTEbsRecordVo">
|
||||||
select record_id, method_name, api_id, api_url, api_param, result, status, description, operate_time, goods_id, goods_name, lot_id, quantity from t_ebs_record
|
select record_id, method_name, api_id, api_url, api_param, result, status, description, operate_time, goods_id, goods_name, lot_id, quantity,CREATE_TIME,UPDATE_TIME from t_ebs_record
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<select id="selectTEbsRecordList" parameterType="TEbsRecord" resultMap="TEbsRecordResult">
|
<select id="selectTEbsRecordList" parameterType="TEbsRecord" resultMap="TEbsRecordResult">
|
||||||
|
|
@ -62,6 +64,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="goodsName != null">goods_name,</if>
|
<if test="goodsName != null">goods_name,</if>
|
||||||
<if test="lotId != null">lot_id,</if>
|
<if test="lotId != null">lot_id,</if>
|
||||||
<if test="quantity != null">quantity,</if>
|
<if test="quantity != null">quantity,</if>
|
||||||
|
<if test="createTime != null">CREATE_TIME,</if>
|
||||||
operate_time,
|
operate_time,
|
||||||
</trim>
|
</trim>
|
||||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
|
|
@ -76,6 +79,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="goodsName != null">#{goodsName},</if>
|
<if test="goodsName != null">#{goodsName},</if>
|
||||||
<if test="lotId != null">#{lotId},</if>
|
<if test="lotId != null">#{lotId},</if>
|
||||||
<if test="quantity != null">#{quantity},</if>
|
<if test="quantity != null">#{quantity},</if>
|
||||||
|
<if test="createTime != null">#{createTime},</if>
|
||||||
now()
|
now()
|
||||||
</trim>
|
</trim>
|
||||||
</insert>
|
</insert>
|
||||||
|
|
@ -94,6 +98,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="goodsName != null">goods_name = #{goodsName},</if>
|
<if test="goodsName != null">goods_name = #{goodsName},</if>
|
||||||
<if test="lotId != null">lot_id = #{lotId},</if>
|
<if test="lotId != null">lot_id = #{lotId},</if>
|
||||||
<if test="quantity != null">quantity = #{quantity},</if>
|
<if test="quantity != null">quantity = #{quantity},</if>
|
||||||
|
<if test="updateTime != null">UPDATE_TIME = #{updateTime},</if>
|
||||||
operate_time = now(),
|
operate_time = now(),
|
||||||
</trim>
|
</trim>
|
||||||
where record_id = #{recordId}
|
where record_id = #{recordId}
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,7 @@ public class BaseEntity implements Serializable
|
||||||
|
|
||||||
/** 创建时间 */
|
/** 创建时间 */
|
||||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
@TableField(value = "CREATE_DATE", fill = FieldFill.INSERT)
|
@TableField(value = "CREATE_TIME", fill = FieldFill.INSERT)
|
||||||
private Date createTime;
|
private Date createTime;
|
||||||
|
|
||||||
/** 更新者 */
|
/** 更新者 */
|
||||||
|
|
@ -36,7 +36,7 @@ public class BaseEntity implements Serializable
|
||||||
|
|
||||||
/** 更新时间 */
|
/** 更新时间 */
|
||||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
@TableField(value = "UPDATE_DATE", fill = FieldFill.INSERT_UPDATE)
|
@TableField(value = "UPDATE_TIME", fill = FieldFill.INSERT_UPDATE)
|
||||||
private Date updateTime;
|
private Date updateTime;
|
||||||
|
|
||||||
/** 备注 */
|
/** 备注 */
|
||||||
|
|
|
||||||
|
|
@ -19,8 +19,8 @@ public class MybatisMetaObjectHandler implements MetaObjectHandler {
|
||||||
@Override
|
@Override
|
||||||
public void insertFill(MetaObject metaObject) {
|
public void insertFill(MetaObject metaObject) {
|
||||||
|
|
||||||
this.strictInsertFill(metaObject, "createDate", Date::new, Date.class);
|
this.strictInsertFill(metaObject, "createTime", Date::new, Date.class);
|
||||||
this.strictInsertFill(metaObject, "updateDate", Date::new, Date.class);
|
this.strictInsertFill(metaObject, "updateTime", Date::new, Date.class);
|
||||||
// this.strictInsertFill(metaObject, "delFlag", String.class,"0");
|
// this.strictInsertFill(metaObject, "delFlag", String.class,"0");
|
||||||
|
|
||||||
String loginName = ShiroUtils.getSysUser().getLoginName();
|
String loginName = ShiroUtils.getSysUser().getLoginName();
|
||||||
|
|
@ -31,7 +31,7 @@ public class MybatisMetaObjectHandler implements MetaObjectHandler {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void updateFill(MetaObject metaObject) {
|
public void updateFill(MetaObject metaObject) {
|
||||||
this.strictInsertFill(metaObject, "updateDate", Date::new, Date.class);
|
this.strictInsertFill(metaObject, "updateTime", Date::new, Date.class);
|
||||||
String loginName = ShiroUtils.getSysUser().getLoginName();
|
String loginName = ShiroUtils.getSysUser().getLoginName();
|
||||||
if (StringUtils.isEmpty(loginName)) return;
|
if (StringUtils.isEmpty(loginName)) return;
|
||||||
this.strictInsertFill(metaObject, "updateBy", String.class, loginName);
|
this.strictInsertFill(metaObject, "updateBy", String.class, loginName);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user