预验收带回与不带回功能

busUser
anthonywj 2 years ago
parent 4dc36c2abb
commit 3c5fcbb407

@ -35,4 +35,7 @@ public interface InvPreInProductDetailDao {
* @param orderIdFk ID * @param orderIdFk ID
*/ */
boolean deleteByOrderId(String orderIdFk); boolean deleteByOrderId(String orderIdFk);
boolean deleteByCode(String orderIdFk, String originCode);
} }

@ -39,5 +39,5 @@ public class BussinessLocalTypeEntity {
private boolean codeFillCheck; private boolean codeFillCheck;
private boolean supplementAll; //是否全量补单 0:禁止补单1缺量补单2。全量补单 private boolean supplementAll; //是否全量补单 0:禁止补单1缺量补单2。全量补单
private int orderVisibleType; //订单详情展示方式0根据批次号展示1:根据条码展示 private int orderVisibleType; //订单详情展示方式0根据批次号展示1:根据条码展示
private boolean preInBack; //预验收带回
} }

@ -77,4 +77,6 @@ public class BussinessTypeEntity {
private boolean vailDispatch; //校验是否可配送 private boolean vailDispatch; //校验是否可配送
private int vailGroupBuy; //校验是否集采产品 0:全部1只采集集采产品2只采集非集采产品 private int vailGroupBuy; //校验是否集采产品 0:全部1只采集集采产品2只采集非集采产品
private boolean preInBack; //预验收带回
} }

@ -82,5 +82,6 @@ public class BussinessTypResponse {
private boolean vailDispatch; private boolean vailDispatch;
private int vailGroupBuy; //校验是否集采产品 0:全部1只采集集采产品2只采集非集采产品 private int vailGroupBuy; //校验是否集采产品 0:全部1只采集集采产品2只采集非集采产品
private boolean preInBack; //预验收带回
} }

@ -10,6 +10,8 @@ import java.util.List;
public interface InvPreInProductDetailService { public interface InvPreInProductDetailService {
List<InvProductDetailEntity> findByOriginCode(String code); List<InvProductDetailEntity> findByOriginCode(String code);
InvProductDetailEntity findByCode(String orderId, String code);
List<InvProductDetailEntity> filterInvProduct(FilterInvProductDetailRequest filterInvProductDetailRequest); List<InvProductDetailEntity> filterInvProduct(FilterInvProductDetailRequest filterInvProductDetailRequest);
List<InvProductDetailJoinResponse> filterJoinInvProduct(FilterInvProductDetailRequest filterInvProductDetailRequest); List<InvProductDetailJoinResponse> filterJoinInvProduct(FilterInvProductDetailRequest filterInvProductDetailRequest);
@ -33,4 +35,7 @@ public interface InvPreInProductDetailService {
InvProductDetailEntity statInvPreInDetail(String code); InvProductDetailEntity statInvPreInDetail(String code);
boolean deleteByOrderIdFk(String orderIdFk); boolean deleteByOrderIdFk(String orderIdFk);
boolean deleteByCode(String orderIdFk, String originCode);
} }

@ -35,6 +35,19 @@ public class InvPreInProductDetailServiceImpl implements InvPreInProductDetailSe
return invProductDetailEntities; return invProductDetailEntities;
} }
@Override
public InvProductDetailEntity findByCode(String orderId, String code) {
FilterInvProductDetailRequest filterInvProductDetailRequest = new FilterInvProductDetailRequest();
filterInvProductDetailRequest.setOriginCode(code);
filterInvProductDetailRequest.setOrderIdFk(orderId);
List<InvProductDetailEntity> invProductDetailEntities = invPreInProductDetailDao.filterInvProductDetail(filterInvProductDetailRequest);
if (CollUtil.isNotEmpty(invProductDetailEntities)) {
return invProductDetailEntities.get(0);
}
return null;
}
@Override @Override
public List<InvProductDetailEntity> filterInvProduct(FilterInvProductDetailRequest filterInvProductDetailRequest) { public List<InvProductDetailEntity> filterInvProduct(FilterInvProductDetailRequest filterInvProductDetailRequest) {
if (filterInvProductDetailRequest == null) { if (filterInvProductDetailRequest == null) {
@ -137,4 +150,8 @@ public class InvPreInProductDetailServiceImpl implements InvPreInProductDetailSe
return invPreInProductDetailDao.deleteByOrderId(orderIdFk); return invPreInProductDetailDao.deleteByOrderId(orderIdFk);
} }
@Override
public boolean deleteByCode(String orderIdFk, String originCode) {
return invPreInProductDetailDao.deleteByCode(orderIdFk, originCode);
}
} }

@ -913,6 +913,7 @@ public class IoTransInoutService {
preInOrder.put(invProductDetailEntities.get(0).getOrderIdFk(), invProductDetailEntities.get(0).getOrderIdFk()); preInOrder.put(invProductDetailEntities.get(0).getOrderIdFk(), invProductDetailEntities.get(0).getOrderIdFk());
} }
} }
boolean isBreak = false;
if (preInOrder.size() > 0) { if (preInOrder.size() > 0) {
String preInBillNo = ""; String preInBillNo = "";
for (String key : preInOrder.keySet()) { for (String key : preInOrder.keySet()) {
@ -920,12 +921,51 @@ public class IoTransInoutService {
OrderEntity preInEntity = orderService.findById(key); OrderEntity preInEntity = orderService.findById(key);
preInEntity.setPreOutBillNo(orderEntity.getId()); preInEntity.setPreOutBillNo(orderEntity.getId());
orderService.updateOrder(preInEntity); orderService.updateOrder(preInEntity);
if (bussinessTypeEntity.isPreInBack()) { //预验收带回
invPreInProductService.deleteByOrderIdFk(preInEntity.getId()); invPreInProductService.deleteByOrderIdFk(preInEntity.getId());
invPreInProductDetailService.deleteByOrderIdFk(preInEntity.getId()); invPreInProductDetailService.deleteByOrderIdFk(preInEntity.getId());
} else {
for (WarehouseEntity codeEntity : codeList) {
if (StrUtil.isEmpty(codeEntity.getSerialNo())) {
InvProductDetailEntity invPreinDetailEntity = invPreInProductDetailService.findByCode(key, codeEntity.getCode());
if (invPreinDetailEntity != null) {
int count = 0;
if (invPreinDetailEntity.getCount() < codeEntity.getCount()) {
count = 0;
} else {
count = invPreinDetailEntity.getCount() - codeEntity.getCount();
}
if (count >= 0) {
isBreak = true;
if (count == 0) {
invPreInProductDetailService.deleteByCode(key, codeEntity.getCode());
} else {
invPreinDetailEntity.setCount(count);
invPreInProductDetailService.updateInvProduct(invPreinDetailEntity);
}
int reCount = invPreinDetailEntity.getCount() - codeEntity.getCount();
if (reCount == 0) {
invPreInProductDetailService.deleteByCode(key, codeEntity.getCode());
} else {
invPreinDetailEntity.setCount(reCount);
invPreInProductDetailService.updateInvProduct(invPreinDetailEntity);
}
}
}
} else {
invPreInProductDetailService.deleteByCode(key, codeEntity.getCode());
}
}
}
} }
orderEntity.setPreInBillNo(preInBillNo.substring(1)); orderEntity.setPreInBillNo(preInBillNo.substring(1));
orderService.updateOrder(orderEntity); orderService.updateOrder(orderEntity);
} }
} }
} }

@ -2,125 +2,144 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" > <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.glxp.api.admin.dao.basic.BussinessLocalTypeDao"> <mapper namespace="com.glxp.api.admin.dao.basic.BussinessLocalTypeDao">
<select id="filterList" parameterType="com.glxp.api.admin.req.basic.BussinessLocalTypeFilterRequest" <select id="filterList" parameterType="com.glxp.api.admin.req.basic.BussinessLocalTypeFilterRequest"
resultType="com.glxp.api.admin.entity.basic.BussinessLocalTypeEntity"> resultType="com.glxp.api.admin.entity.basic.BussinessLocalTypeEntity">
SELECT basic_bustype_local.* ,basic_bussiness_type.mainAction ,basic_bustype_origin.name originName from SELECT basic_bustype_local.*, basic_bussiness_type.mainAction, basic_bustype_origin.name originName
basic_bustype_local from basic_bustype_local
LEFT JOIN basic_bussiness_type on basic_bussiness_type.localAction = basic_bustype_local.action LEFT JOIN basic_bussiness_type on basic_bussiness_type.localAction = basic_bustype_local.action
LEFT JOIN basic_bustype_origin on basic_bustype_local.originAction = basic_bustype_origin.action LEFT JOIN basic_bustype_origin on basic_bustype_local.originAction = basic_bustype_origin.action
<where> <where>
<if test="name != ''and name != null"> <if test="name != ''and name != null">
AND basic_bustype_local.name LIKE concat('%',#{name},'%') AND basic_bustype_local.name LIKE concat('%', #{name}, '%')
</if> </if>
<if test="action != ''and action != null"> <if test="action != ''and action != null">
AND action LIKE concat(#{action},'%') AND action LIKE concat(#{action}, '%')
</if> </if>
<if test="originAction != ''and originAction != null"> <if test="originAction != ''and originAction != null">
AND originAction =#{originAction} AND originAction = #{originAction}
</if> </if>
<if test="spUse != ''and spUse != null"> <if test="spUse != ''and spUse != null">
AND spUse =#{spUse} AND spUse = #{spUse}
</if> </if>
</where> </where>
order by basic_bustype_local.updateTime desc order by basic_bustype_local.updateTime desc
</select> </select>
<select id="filterUnBind" parameterType="com.glxp.api.admin.req.basic.BussinessLocalTypeFilterRequest" <select id="filterUnBind" parameterType="com.glxp.api.admin.req.basic.BussinessLocalTypeFilterRequest"
resultType="com.glxp.api.admin.entity.basic.BussinessLocalTypeEntity"> resultType="com.glxp.api.admin.entity.basic.BussinessLocalTypeEntity">
select basic_bustype_local.* from basic_bustype_local select basic_bustype_local.*
from basic_bustype_local
LEFT JOIN basic_bussiness_type on basic_bustype_local.action = basic_bussiness_type.localAction LEFT JOIN basic_bussiness_type on basic_bustype_local.action = basic_bussiness_type.localAction
<where> <where>
localAction is NULL localAction is NULL
<if test="name != ''and name != null"> <if test="name != ''and name != null">
AND basic_bustype_local.name LIKE concat('%',#{name},'%') AND basic_bustype_local.name LIKE concat('%', #{name}, '%')
</if> </if>
<if test="action != ''and action != null"> <if test="action != ''and action != null">
AND action LIKE concat('%',#{action},'%') AND action LIKE concat('%', #{action}, '%')
</if> </if>
<if test="originAction != ''and originAction != null"> <if test="originAction != ''and originAction != null">
AND originAction =#{originAction} AND originAction = #{originAction}
</if> </if>
</where> </where>
</select> </select>
<select id="filterAllList" parameterType="com.glxp.api.admin.req.basic.BussinessLocalTypeFilterRequest" <select id="filterAllList" parameterType="com.glxp.api.admin.req.basic.BussinessLocalTypeFilterRequest"
resultType="com.glxp.api.admin.entity.basic.BussinessLocalTypeEntity"> resultType="com.glxp.api.admin.entity.basic.BussinessLocalTypeEntity">
SELECT * from basic_bustype_local SELECT *
from basic_bustype_local
<where> <where>
<if test="name != ''and name != null"> <if test="name != ''and name != null">
AND basic_bustype_local.name LIKE concat('%',#{name},'%') AND basic_bustype_local.name LIKE concat('%', #{name}, '%')
</if> </if>
<if test="action != ''and action != null"> <if test="action != ''and action != null">
AND action LIKE concat(#{action},'%') AND action LIKE concat(#{action}, '%')
</if> </if>
<if test="originAction != ''and originAction != null"> <if test="originAction != ''and originAction != null">
AND originAction =#{originAction} AND originAction = #{originAction}
</if> </if>
<if test="spUse != ''and spUse != null"> <if test="spUse != ''and spUse != null">
AND basic_bustype_local.spUse =#{spUse} AND basic_bustype_local.spUse = #{spUse}
</if> </if>
<if test="lastUpdateTime!=null and lastUpdateTime!=''"> <if test="lastUpdateTime != null and lastUpdateTime != ''">
<![CDATA[ and DATE_FORMAT(updateTime, '%Y-%m-%d %H:%i:%S')>= DATE_FORMAT(#{lastUpdateTime}, '%Y-%m-%d %H:%i:%S') ]]> <![CDATA[
and DATE_FORMAT(updateTime, '%Y-%m-%d %H:%i:%S') >= DATE_FORMAT(#{lastUpdateTime}, '%Y-%m-%d %H:%i:%S')
]]>
</if> </if>
</where> </where>
</select> </select>
<select id="filterJoin" parameterType="com.glxp.api.admin.req.basic.BussinessLocalTypeFilterRequest" <select id="filterJoin" parameterType="com.glxp.api.admin.req.basic.BussinessLocalTypeFilterRequest"
resultType="com.glxp.api.admin.entity.basic.BussinessLocalTypeEntity"> resultType="com.glxp.api.admin.entity.basic.BussinessLocalTypeEntity">
SELECT basic_bustype_local.id,basic_bustype_local.name localName, basic_bustype_local.action SELECT basic_bustype_local.id,
localAction,originAction, basic_bustype_local.name localName,
basic_bussiness_type.name , basic_bustype_local.action
basic_bussiness_type.action,basic_bussiness_type.checkEnable,basic_bustype_local.advanceType,basic_bustype_local.changeEnable, localAction,
basic_bustype_local.spUse,basic_bussiness_type.storageCode,basic_bussiness_type.corpType,basic_bussiness_type.mainAction originAction,
,basic_bussiness_type.prefix,basic_bustype_local.prefix localPrefix,basic_bustype_local.preIn, basic_bussiness_type.name,
basic_bussiness_type.ullageFill, basic_bussiness_type.scanPreIn, basic_bussiness_type.vailInv, basic_bussiness_type.action,
basic_bussiness_type.checkEnable,
basic_bustype_local.advanceType,
basic_bustype_local.changeEnable,
basic_bustype_local.spUse,
basic_bussiness_type.storageCode,
basic_bussiness_type.corpType,
basic_bussiness_type.mainAction
,
basic_bussiness_type.prefix,
basic_bustype_local.prefix localPrefix,
basic_bustype_local.preIn,
basic_bustype_local.preInBack,
basic_bussiness_type.ullageFill,
basic_bussiness_type.scanPreIn,
basic_bussiness_type.vailInv,
basic_bussiness_type.codeFillCheck basic_bussiness_type.codeFillCheck
, basic_bustype_local.supplementAll,basic_bussiness_type.orderVisibleType ,
basic_bustype_local.supplementAll,
basic_bussiness_type.orderVisibleType
FROM basic_bustype_local FROM basic_bustype_local
inner join basic_bussiness_type inner join basic_bussiness_type
on basic_bustype_local.action = basic_bussiness_type.localAction on basic_bustype_local.action = basic_bussiness_type.localAction
<where> <where>
<if test="name != ''and name != null"> <if test="name != ''and name != null">
AND basic_bustype_local.name LIKE concat('%',#{name},'%') AND basic_bustype_local.name LIKE concat('%', #{name}, '%')
</if> </if>
<if test="action != ''and action != null"> <if test="action != ''and action != null">
AND basic_bustype_local.action LIKE concat(#{action},'%') AND basic_bustype_local.action LIKE concat(#{action}, '%')
</if> </if>
<if test="enabled != ''and enabled != null"> <if test="enabled != ''and enabled != null">
AND basic_bussiness_type.enable =#{enabled} AND basic_bussiness_type.enable = #{enabled}
</if> </if>
<if test="spUse != ''and spUse != null"> <if test="spUse != ''and spUse != null">
AND basic_bustype_local.spUse =#{spUse} AND basic_bustype_local.spUse = #{spUse}
</if> </if>
</where> </where>
group by basic_bussiness_type.action group by basic_bussiness_type.action
</select> </select>
<select id="filterJoinOrigin" parameterType="com.glxp.api.admin.req.basic.BusOriginJoinFilterRequest" <select id="filterJoinOrigin" parameterType="com.glxp.api.admin.req.basic.BusOriginJoinFilterRequest"
resultType="com.glxp.api.admin.res.basic.BussinessOriginTypeResponse"> resultType="com.glxp.api.admin.res.basic.BussinessOriginTypeResponse">
select select basic_bussiness_type.action,
basic_bussiness_type.action,basic_bussiness_type.`name`, basic_bussiness_type.`name`,
basic_bussiness_type.localAction,basic_bustype_local.`name` localName, basic_bussiness_type.localAction,
basic_bustype_origin.action originAction,basic_bustype_origin.name originName, basic_bustype_local.`name` localName,
thirdSys,thirdSysName,basic_bustype_origin.`enable` originEnable basic_bustype_origin.action originAction,
basic_bustype_origin.name originName,
thirdSys,
thirdSysName,
basic_bustype_origin.`enable` originEnable
from basic_bussiness_type from basic_bussiness_type
left JOIN basic_bustype_local on basic_bussiness_type.localAction = basic_bustype_local.action left JOIN basic_bustype_local on basic_bussiness_type.localAction = basic_bustype_local.action
left JOIN basic_bustype_origin on basic_bustype_local.originAction = basic_bustype_origin.action left JOIN basic_bustype_origin on basic_bustype_local.originAction = basic_bustype_origin.action
<where> <where>
<if test="action != ''and action != null"> <if test="action != ''and action != null">
AND basic_bussiness_type.action =#{action} AND basic_bussiness_type.action = #{action}
</if> </if>
<if test="localAction != ''and localAction != null"> <if test="localAction != ''and localAction != null">
AND basic_bustype_local.action =#{localAction} AND basic_bustype_local.action = #{localAction}
</if> </if>
<if test="thirdAction != ''and thirdAction != null"> <if test="thirdAction != ''and thirdAction != null">
AND basic_bustype_origin.action =#{thirdAction} AND basic_bustype_origin.action = #{thirdAction}
</if> </if>
</where> </where>
GROUP BY basic_bussiness_type.id GROUP BY basic_bussiness_type.id
@ -128,8 +147,7 @@
<select id="filterJoinByUser" parameterType="com.glxp.api.admin.req.basic.BussinessLocalTypeFilterRequest" <select id="filterJoinByUser" parameterType="com.glxp.api.admin.req.basic.BussinessLocalTypeFilterRequest"
resultType="com.glxp.api.admin.entity.basic.BussinessLocalTypeEntity"> resultType="com.glxp.api.admin.entity.basic.BussinessLocalTypeEntity">
SELECT SELECT basic_bustype_local.id,
basic_bustype_local.id,
basic_bustype_local.NAME localName, basic_bustype_local.NAME localName,
basic_bustype_local.action localAction, basic_bustype_local.action localAction,
originAction, originAction,
@ -146,6 +164,8 @@
basic_bussiness_type.genUnit, basic_bussiness_type.genUnit,
basic_bussiness_type.prefix, basic_bussiness_type.prefix,
basic_bustype_local.prefix, basic_bustype_local.prefix,
basic_bustype_local.preIn,
basic_bustype_local.preInBack,
basic_bussiness_type.ullageFill, basic_bussiness_type.ullageFill,
basic_bussiness_type.scanPreIn, basic_bussiness_type.scanPreIn,
basic_bussiness_type.vailInv, basic_bussiness_type.vailInv,
@ -153,26 +173,24 @@
basic_bussiness_type.prefix, basic_bussiness_type.prefix,
basic_bustype_local.prefix localPrefix, basic_bustype_local.prefix localPrefix,
basic_bussiness_type.ullageFill, basic_bussiness_type.ullageFill,
basic_bussiness_type.scanPreIn,
basic_bussiness_type.vailInv, basic_bussiness_type.vailInv,
basic_bussiness_type.codeFillCheck, basic_bussiness_type.codeFillCheck,
supplementAll supplementAll
FROM FROM basic_bustype_local
basic_bustype_local
INNER JOIN basic_bussiness_type ON basic_bustype_local.action = basic_bussiness_type.localAction INNER JOIN basic_bussiness_type ON basic_bustype_local.action = basic_bussiness_type.localAction
INNER JOIN inv_bustype_user ON basic_bussiness_type.action = inv_bustype_user.scAction INNER JOIN inv_bustype_user ON basic_bussiness_type.action = inv_bustype_user.scAction
<where> <where>
<if test="name != ''and name != null"> <if test="name != ''and name != null">
AND basic_bustype_local.name LIKE concat('%',#{name},'%') AND basic_bustype_local.name LIKE concat('%', #{name}, '%')
</if> </if>
<if test="action != ''and action != null"> <if test="action != ''and action != null">
AND basic_bustype_local.action LIKE concat(#{action},'%') AND basic_bustype_local.action LIKE concat(#{action}, '%')
</if> </if>
<if test="enabled != ''and enabled != null"> <if test="enabled != ''and enabled != null">
AND basic_bussiness_type.enable =#{enabled} AND basic_bussiness_type.enable = #{enabled}
</if> </if>
<if test="spUse != ''and spUse != null"> <if test="spUse != ''and spUse != null">
AND basic_bustype_local.spUse =#{spUse} AND basic_bustype_local.spUse = #{spUse}
</if> </if>
<if test="code != ''and code != null"> <if test="code != ''and code != null">
@ -191,23 +209,37 @@
<select id="filterLeftJoin" parameterType="com.glxp.api.admin.req.basic.BussinessLocalTypeFilterRequest" <select id="filterLeftJoin" parameterType="com.glxp.api.admin.req.basic.BussinessLocalTypeFilterRequest"
resultType="com.glxp.api.admin.entity.basic.BussinessLocalTypeEntity"> resultType="com.glxp.api.admin.entity.basic.BussinessLocalTypeEntity">
SELECT basic_bustype_local.id,basic_bustype_local.name localName, basic_bustype_local.action SELECT basic_bustype_local.id,
localAction,originAction, basic_bustype_local.name localName,
basic_bussiness_type.name , basic_bustype_local.action
basic_bussiness_type.action,basic_bussiness_type.checkEnable,basic_bustype_local.advanceType,basic_bustype_local.changeEnable, localAction,
basic_bustype_local.spUse,basic_bussiness_type.storageCode,basic_bussiness_type.corpType,basic_bussiness_type.mainAction originAction,
,basic_bussiness_type.prefix,basic_bustype_local.prefix localPrefix,preIn,supplementAll basic_bussiness_type.name,
basic_bussiness_type.action,
basic_bussiness_type.checkEnable,
basic_bustype_local.advanceType,
basic_bustype_local.changeEnable,
basic_bustype_local.spUse,
basic_bussiness_type.storageCode,
basic_bussiness_type.corpType,
basic_bussiness_type.mainAction
,
basic_bussiness_type.prefix,
basic_bustype_local.prefix localPrefix,
preIn,
basic_bustype_local.preInBack,
supplementAll
FROM basic_bustype_local FROM basic_bustype_local
LEFT JOIN basic_bussiness_type on basic_bussiness_type.localAction = basic_bustype_local.action LEFT JOIN basic_bussiness_type on basic_bussiness_type.localAction = basic_bustype_local.action
<where> <where>
<if test="name != ''and name != null"> <if test="name != ''and name != null">
AND basic_bustype_local.name LIKE concat('%',#{name},'%') AND basic_bustype_local.name LIKE concat('%', #{name}, '%')
</if> </if>
<if test="action != ''and action != null"> <if test="action != ''and action != null">
AND basic_bustype_local.action LIKE concat(#{action},'%') AND basic_bustype_local.action LIKE concat(#{action}, '%')
</if> </if>
<if test="spUse != ''and spUse != null"> <if test="spUse != ''and spUse != null">
AND spUse =#{spUse} AND spUse = #{spUse}
</if> </if>
</where> </where>
</select> </select>
@ -217,9 +249,9 @@
parameterType="com.glxp.api.admin.entity.basic.BussinessLocalTypeEntity"> parameterType="com.glxp.api.admin.entity.basic.BussinessLocalTypeEntity">
replace replace
INTO basic_bustype_local INTO basic_bustype_local
(action, name, remark, originAction, advanceType, changeEnable, spUse,updateTime,prefix,preIn,supplementAll) (action, name, remark, originAction, advanceType, changeEnable, spUse, updateTime, prefix, preIn,
values ( supplementAll, preInBack)
#{action}, values (#{action},
#{name}, #{name},
#{remark}, #{remark},
#{originAction}, #{originAction},
@ -229,25 +261,48 @@
#{updateTime}, #{updateTime},
#{prefix}, #{prefix},
#{preIn}, #{preIn},
#{supplementAll} #{supplementAll}, #{preInBack})
)
</insert> </insert>
<update id="updateBusLocalType" parameterType="com.glxp.api.admin.entity.basic.BussinessLocalTypeEntity"> <update id="updateBusLocalType" parameterType="com.glxp.api.admin.entity.basic.BussinessLocalTypeEntity">
UPDATE basic_bustype_local UPDATE basic_bustype_local
<trim prefix="set" suffixOverrides=","> <trim prefix="set" suffixOverrides=",">
<if test="action != null">action = #{action},</if> <if test="action != null">
<if test="name != null">name = #{name},</if> action = #{action},
<if test="remark != null">remark = #{remark},</if> </if>
<if test="originAction != null">originAction = #{originAction},</if> <if test="name != null">
<if test="advanceType != null">advanceType = #{advanceType},</if> name = #{name},
<if test="changeEnable != null">changeEnable = #{changeEnable},</if> </if>
<if test="spUse != null">spUse = #{spUse},</if> <if test="remark != null">
<if test="updateTime != null">updateTime = #{updateTime},</if> remark = #{remark},
<if test="prefix != null">prefix = #{prefix},</if> </if>
<if test="preIn != null">preIn = #{preIn},</if> <if test="originAction != null">
<if test="supplementAll != null">supplementAll = #{supplementAll},</if> originAction = #{originAction},
</if>
<if test="advanceType != null">
advanceType = #{advanceType},
</if>
<if test="changeEnable != null">
changeEnable = #{changeEnable},
</if>
<if test="spUse != null">
spUse = #{spUse},
</if>
<if test="updateTime != null">
updateTime = #{updateTime},
</if>
<if test="prefix != null">
prefix = #{prefix},
</if>
<if test="preIn != null">
preIn = #{preIn},
</if>
<if test="supplementAll != null">
supplementAll = #{supplementAll},
</if>
<if test="preInBack != null">
preInBack = #{preInBack},
</if>
</trim> </trim>
WHERE id = #{id} WHERE id = #{id}
</update> </update>
@ -283,7 +338,8 @@
</select> </select>
<select id="selectByName" parameterType="string" resultType="com.glxp.api.admin.entity.basic.BussinessLocalTypeEntity"> <select id="selectByName" parameterType="string"
resultType="com.glxp.api.admin.entity.basic.BussinessLocalTypeEntity">
select * select *
FROM basic_bustype_local FROM basic_bustype_local
<where> <where>
@ -293,7 +349,6 @@
<if test="id != ''and id != null"> <if test="id != ''and id != null">
AND basic_bustype_local.id != #{id} AND basic_bustype_local.id != #{id}
</if> </if>
</where> </where>
</select> </select>
</mapper> </mapper>

@ -53,6 +53,7 @@
basic_bustype_local.prefix basic_bustype_local.prefix
localPrefix, localPrefix,
basic_bustype_local.preIn, basic_bustype_local.preIn,
basic_bustype_local.preInBack,
basic_bussiness_type.defaultSubInv, basic_bussiness_type.defaultSubInv,
basic_bussiness_type.defaultInv, basic_bussiness_type.defaultInv,
orderVisibleType, orderVisibleType,
@ -128,6 +129,7 @@
basic_bussiness_type.expireTip, basic_bussiness_type.expireTip,
basic_bustype_local.prefix localPrefix, basic_bustype_local.prefix localPrefix,
basic_bustype_local.preIn, basic_bustype_local.preIn,
basic_bustype_local.preInBack,
orderVisibleType, orderVisibleType,
supplementAll supplementAll
from basic_bussiness_type from basic_bussiness_type
@ -221,6 +223,7 @@
basic_bustype_local.prefix basic_bustype_local.prefix
localPrefix, localPrefix,
basic_bustype_local.preIn, basic_bustype_local.preIn,
basic_bustype_local.preInBack,
basic_bussiness_type.defaultSubInv, basic_bussiness_type.defaultSubInv,
basic_bussiness_type.defaultInv, basic_bussiness_type.defaultInv,
orderVisibleType, orderVisibleType,
@ -279,7 +282,8 @@
, secCheckUdims, secCheckPdaEd, secCheckPdaUn, secCheckPc, secCheckWebNew, , secCheckUdims, secCheckPdaEd, secCheckPdaUn, secCheckPc, secCheckWebNew,
secCheckChange, corpType, basic_bussiness_type.storageCode, checkBalacne, secCheckChange, corpType, basic_bussiness_type.storageCode, checkBalacne,
secCheckBalacne, supplementOrderType, defaultUnit, useDyCount, expireTip, updateTime, prefix secCheckBalacne, supplementOrderType, defaultUnit, useDyCount, expireTip, updateTime, prefix
, ullageFill, scanPreIn, vailInv, codeFillCheck, defaultSubInv, outTospms, entrutSpms, defaultInv, , ullageFill, scanPreIn, vailInv, codeFillCheck, defaultSubInv, outTospms, entrutSpms,
defaultInv,
orderVisibleType, checkCopy, secCheckCopy, vailDispatch, vailGroupBuy) orderVisibleType, checkCopy, secCheckCopy, vailDispatch, vailGroupBuy)
values (#{action}, values (#{action},
#{name}, #{name},
@ -338,7 +342,8 @@
, secCheckUdims, secCheckPdaEd, secCheckPdaUn, secCheckPc, secCheckWebNew, , secCheckUdims, secCheckPdaEd, secCheckPdaUn, secCheckPc, secCheckWebNew,
secCheckChange, corpType, storageCode, checkBalacne, secCheckBalacne, supplementOrderType, defaultUnit, secCheckChange, corpType, storageCode, checkBalacne, secCheckBalacne, supplementOrderType, defaultUnit,
useDyCount, expireTip, updateTime, prefix useDyCount, expireTip, updateTime, prefix
, ullageFill, scanPreIn, vailInv, codeFillCheck, defaultSubInv, outTospms, entrutSpms, defaultInv, , ullageFill, scanPreIn, vailInv, codeFillCheck, defaultSubInv, outTospms, entrutSpms,
defaultInv,
orderVisibleType, checkCopy, secCheckCopy, vailDispatch, vailGroupBuy) orderVisibleType, checkCopy, secCheckCopy, vailDispatch, vailGroupBuy)
values (#{index}, values (#{index},
#{action}, #{action},
@ -535,7 +540,6 @@
<if test="vailGroupBuy != null"> <if test="vailGroupBuy != null">
vailGroupBuy=#{vailGroupBuy}, vailGroupBuy=#{vailGroupBuy},
</if> </if>
thirdSysFk=#{thirdSysFk}, thirdSysFk=#{thirdSysFk},
</trim> </trim>
WHERE id = #{id} WHERE id = #{id}

@ -2,10 +2,10 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" > <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.glxp.api.admin.dao.inventory.InvPreInProductDetailDao"> <mapper namespace="com.glxp.api.admin.dao.inventory.InvPreInProductDetailDao">
<select id="filterInvProductDetail" parameterType="com.glxp.api.admin.req.inventory.FilterInvProductDetailRequest" <select id="filterInvProductDetail" parameterType="com.glxp.api.admin.req.inventory.FilterInvProductDetailRequest"
resultType="com.glxp.api.admin.entity.inventory.InvProductDetailEntity"> resultType="com.glxp.api.admin.entity.inventory.InvProductDetailEntity">
SELECT * FROM inv_prein_product_detail SELECT *
FROM inv_prein_product_detail
<where> <where>
<if test="productIdFk != '' and productIdFk != null"> <if test="productIdFk != '' and productIdFk != null">
AND productIdFk = #{productIdFk} AND productIdFk = #{productIdFk}
@ -27,7 +27,7 @@
AND purchaseType = #{purchaseType} AND purchaseType = #{purchaseType}
</if> </if>
<if test="batchNo != '' and batchNo != null and batchNo!='empty'"> <if test="batchNo != '' and batchNo != null and batchNo != 'empty'">
AND batchNo = #{batchNo} AND batchNo = #{batchNo}
</if> </if>
<if test="batchNo == 'empty'"> <if test="batchNo == 'empty'">
@ -55,13 +55,13 @@
AND orderIdFk = #{orderIdFk} AND orderIdFk = #{orderIdFk}
</if> </if>
</where> </where>
</select> </select>
<select id="findAllCode" parameterType="com.glxp.api.admin.req.inventory.FilterInvProductDetailRequest" <select id="findAllCode" parameterType="com.glxp.api.admin.req.inventory.FilterInvProductDetailRequest"
resultType="java.lang.String"> resultType="java.lang.String">
SELECT originCode FROM inv_prein_product_detail SELECT originCode
FROM inv_prein_product_detail
<where> <where>
<if test="productIdFk != '' and productIdFk != null"> <if test="productIdFk != '' and productIdFk != null">
AND productIdFk = #{productIdFk} AND productIdFk = #{productIdFk}
@ -83,7 +83,7 @@
AND purchaseType = #{purchaseType} AND purchaseType = #{purchaseType}
</if> </if>
<if test="batchNo != '' and batchNo != null and batchNo!='empty'"> <if test="batchNo != '' and batchNo != null and batchNo != 'empty'">
AND batchNo = #{batchNo} AND batchNo = #{batchNo}
</if> </if>
<if test="batchNo == 'empty'"> <if test="batchNo == 'empty'">
@ -108,13 +108,13 @@
AND invWarehouseCode = #{invWarehouseCode} AND invWarehouseCode = #{invWarehouseCode}
</if> </if>
</where> </where>
</select> </select>
<select id="filterJoinInvProduct" parameterType="com.glxp.api.admin.req.inventory.FilterInvProductDetailRequest" <select id="filterJoinInvProduct" parameterType="com.glxp.api.admin.req.inventory.FilterInvProductDetailRequest"
resultType="com.glxp.api.admin.res.inventory.InvProductDetailJoinResponse"> resultType="com.glxp.api.admin.res.inventory.InvProductDetailJoinResponse">
SELECT inv_prein_product_detail.* ,io_order.fromCorp,io_order.fromCorpId FROM inv_prein_product_detail SELECT inv_prein_product_detail.*, io_order.fromCorp, io_order.fromCorpId
FROM inv_prein_product_detail
inner join io_order on inv_prein_product_detail.orderIdFk = io_order.id inner join io_order on inv_prein_product_detail.orderIdFk = io_order.id
<where> <where>
<if test="productIdFk != '' and productIdFk != null"> <if test="productIdFk != '' and productIdFk != null">
@ -159,7 +159,6 @@
AND invWarehouseCode = #{invWarehouseCode} AND invWarehouseCode = #{invWarehouseCode}
</if> </if>
</where> </where>
</select> </select>
@ -174,29 +173,25 @@
#{customerId}, #{mainAction}, #{action}, #{count}, #{updateTime}, #{customerId}, #{mainAction}, #{action}, #{count}, #{updateTime},
#{purchaseType}, #{batchNo}, #{productionDate}, #{expireDate}, #{unitFk}, #{stockIdFk} #{purchaseType}, #{batchNo}, #{productionDate}, #{expireDate}, #{unitFk}, #{stockIdFk}
, #{supId}, #{originCode}, #{invStorageCode}, #{invWarehouseCode}) , #{supId}, #{originCode}, #{invStorageCode}, #{invWarehouseCode})
</insert> </insert>
<insert id="insertInvProductDetails" keyProperty="id" <insert id="insertInvProductDetails" keyProperty="id"
parameterType="com.glxp.api.admin.entity.inventory.InvProductDetailEntity"> parameterType="com.glxp.api.admin.entity.inventory.InvProductDetailEntity">
insert INTO inv_prein_product_detail insert INTO inv_prein_product_detail
(code, productIdFk, orderIdFk, customerId, mainAction, action, count, updateTime, (code, productIdFk, orderIdFk, customerId, mainAction, action, count, updateTime,
purchaseType, batchNo, productionDate, expireDate, unitFk, stockIdFk, supId,originCode purchaseType, batchNo, productionDate, expireDate, unitFk, stockIdFk, supId, originCode
, invStorageCode, invWarehouseCode) , invStorageCode, invWarehouseCode)
values values
<foreach collection="invProductDetailEntitys" item="item" index="index" <foreach collection="invProductDetailEntitys" item="item" index="index"
separator=","> separator=",">
( (#{item.code},
#{item.code}, #{item.productIdFk}, #{item.orderIdFk},
#{item.productIdFk},#{item.orderIdFk}, #{item.customerId}, #{item.mainAction}, #{item.action}, #{item.count}, #{item.updateTime},
#{item.customerId},#{item.mainAction},#{item.action},#{item.count},#{item.updateTime},
#{item.purchaseType}, #{item.batchNo}, #{item.productionDate}, #{item.expireDate}, #{item.purchaseType}, #{item.batchNo}, #{item.productionDate}, #{item.expireDate},
#{item.unitFk},#{item.stockIdFk},#{item.supId},#{item.originCode}, #{item.invStorageCode}, #{item.unitFk}, #{item.stockIdFk}, #{item.supId}, #{item.originCode}, #{item.invStorageCode},
#{item.invWarehouseCode} #{item.invWarehouseCode})
)
</foreach> </foreach>
</insert> </insert>
@ -213,8 +208,8 @@
<if test="productIdFk != '' and productIdFk != null"> <if test="productIdFk != '' and productIdFk != null">
AND productIdFk = #{productIdFk} AND productIdFk = #{productIdFk}
</if> </if>
<if test="batchNo != '' and batchNo != null and batchNo!='empty'"> <if test="batchNo != '' and batchNo != null and batchNo != 'empty'">
AND inv_prein_product_detail.batchNo like concat('%',#{batchNo},'%') AND inv_prein_product_detail.batchNo like concat('%', #{batchNo}, '%')
</if> </if>
<if test="batchNo == 'empty'"> <if test="batchNo == 'empty'">
AND batchNo is NULL AND batchNo is NULL
@ -228,6 +223,18 @@
</where> </where>
</delete> </delete>
<delete id="deleteByCode" parameterType="Map">
DELETE
FROM inv_prein_product_detail
<where>
<if test="orderIdFk != '' and orderIdFk != null">
AND orderIdFk = #{orderIdFk}
</if>
<if test="originCode != '' and originCode != null">
AND originCode = #{originCode}
</if>
</where>
</delete>
<delete id="deleteByOrderId"> <delete id="deleteByOrderId">
delete delete
from inv_prein_product_detail from inv_prein_product_detail
@ -237,28 +244,61 @@
<update id="updateInvProductDetail" parameterType="com.glxp.api.admin.entity.inventory.InvProductDetailEntity"> <update id="updateInvProductDetail" parameterType="com.glxp.api.admin.entity.inventory.InvProductDetailEntity">
UPDATE inv_prein_product_detail UPDATE inv_prein_product_detail
<trim prefix="set" suffixOverrides=","> <trim prefix="set" suffixOverrides=",">
<if test="code != null">code=#{code},</if> <if test="code != null">
<if test="productIdFk != null">productIdFk=#{productIdFk},</if> code=#{code},
<if test="customerId != null">customerId=#{customerId},</if> </if>
<if test="mainAction != null">mainAction=#{mainAction},</if> <if test="productIdFk != null">
<if test="action != null">action=#{action},</if> productIdFk=#{productIdFk},
<if test="count != null">count=#{count},</if> </if>
<if test="unitFk != null">unitFk=#{unitFk},</if> <if test="customerId != null">
<if test="purchaseType != null">purchaseType=#{purchaseType},</if> customerId=#{customerId},
<if test="batchNo != null">batchNo=#{batchNo},</if> </if>
<if test="productionDate != null">productionDate=#{productionDate},</if> <if test="mainAction != null">
<if test="expireDate != null">expireDate=#{expireDate},</if> mainAction=#{mainAction},
<if test="stockIdFk != null">stockIdFk=#{stockIdFk},</if> </if>
<if test="supId != null">supId=#{supId},</if> <if test="action != null">
<if test="originCode != null">originCode=#{originCode},</if> action=#{action},
<if test="invStorageCode != null">invStorageCode=#{invStorageCode},</if> </if>
<if test="invWarehouseCode != null">invWarehouseCode=#{invWarehouseCode},</if> <if test="count != null">
count=#{count},
</if>
<if test="unitFk != null">
unitFk=#{unitFk},
</if>
<if test="purchaseType != null">
purchaseType=#{purchaseType},
</if>
<if test="batchNo != null">
batchNo=#{batchNo},
</if>
<if test="productionDate != null">
productionDate=#{productionDate},
</if>
<if test="expireDate != null">
expireDate=#{expireDate},
</if>
<if test="stockIdFk != null">
stockIdFk=#{stockIdFk},
</if>
<if test="supId != null">
supId=#{supId},
</if>
<if test="originCode != null">
originCode=#{originCode},
</if>
<if test="invStorageCode != null">
invStorageCode=#{invStorageCode},
</if>
<if test="invWarehouseCode != null">
invWarehouseCode=#{invWarehouseCode},
</if>
</trim> </trim>
WHERE id = #{id} WHERE id = #{id}
</update> </update>
<select id="statCount" parameterType="com.glxp.api.admin.req.inventory.FilterInvProductDetailRequest" <select id="statCount" parameterType="com.glxp.api.admin.req.inventory.FilterInvProductDetailRequest"
resultType="java.lang.Integer"> resultType="java.lang.Integer">
SELECT count(0) FROM inv_prein_product_detail SELECT count(0)
FROM inv_prein_product_detail
<where> <where>
<if test="productIdFk != '' and productIdFk != null"> <if test="productIdFk != '' and productIdFk != null">
AND productIdFk = #{productIdFk} AND productIdFk = #{productIdFk}
@ -288,8 +328,5 @@
AND supId = #{supId} AND supId = #{supId}
</if> </if>
</where> </where>
</select> </select>
</mapper> </mapper>

@ -37,3 +37,6 @@ create table if not exists `io_code_lost` (
`nameCode` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL, `nameCode` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
PRIMARY KEY (`id`) USING BTREE PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 3 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '扫码缺失字段信息补齐表' ROW_FORMAT = DYNAMIC; ) ENGINE = InnoDB AUTO_INCREMENT = 3 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '扫码缺失字段信息补齐表' ROW_FORMAT = DYNAMIC;
CALL Pro_Temp_ColumnWork('basic_bussiness_type', 'preInBack', 'tinyint', 1);

Loading…
Cancel
Save