添加耗材字典对应集采信息,bug修改

master
anthonywj 2 years ago
parent 1bb83857a9
commit 1cdfb36774

@ -31,6 +31,7 @@ import com.glxp.api.util.CustomUtil;
import com.glxp.api.util.GennerOrderUtils;
import com.glxp.api.util.OrderNoTypeBean;
import com.glxp.api.util.RedisUtil;
import com.glxp.api.util.udi.UdiCalCountUtil;
import lombok.extern.slf4j.Slf4j;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.GetMapping;
@ -103,6 +104,8 @@ public class IoOrderReviewController extends BaseController {
IoCodeService codeService;
@Resource
IoCodeTempService codeTempService;
@Resource
UdiCalCountUtil calCountUtil;
//前端扫码验收
@AuthRuleAnnotation("")
@ -137,7 +140,7 @@ public class IoOrderReviewController extends BaseController {
for (IoOrderDetailResultResponse orderDetailResultResponse : orderDetailResultResponses) {
if (orderDetailResultResponse.getBindRlFk().longValue() == codeEntity.getRelId().longValue() &&
StrUtil.trimToEmpty(orderDetailResultResponse.getBatchNo()).equals(StrUtil.trimToEmpty(codeEntity.getBatchNo()))) {
orderDetailResultResponse.setAcceptCount(orderDetailResultResponse.getAcceptCount() + codeEntity.getMyReCount());
orderDetailResultResponse.setAcceptCount(orderDetailResultResponse.getAcceptCount() + calCountUtil.getActCount(codeEntity.getRelId()));
if (orderDetailResultResponse.getAcceptCount() > orderDetailResultResponse.getCount()) {
return ResultVOUtils.error(500, "数量溢出!");
}

@ -348,4 +348,10 @@ public class BasicBussinessTypeEntity {
*/
@TableField(exist = false)
private boolean select;
@TableField(value = "vailDispatch")
private boolean vailDispatch; //校验是否可配送
@TableField(value = "vailGroupBuy")
private int vailGroupBuy; //校验是否集采产品 0:全部1只采集集采产品2只采集非集采产品
}

@ -37,5 +37,10 @@ public class UdiRelevanceEntity {
private Integer lowStockNum;
private Integer overStockNum;
private Integer recentDateTime;
private Integer useExpireTime;
private boolean dispatch; //是否可配送
private boolean groupBuy; //是否集采产品
private String relCode;
}

@ -34,4 +34,7 @@ public class BussinessTypeFilterRequest extends ListPageRequest {
private List<String> actionList;
private Boolean preIn;
private boolean vailDispatch;
private int vailGroupBuy;
}

@ -272,6 +272,7 @@ public class BussinessTypeSaveRequest {
private Boolean supplementAll;
private boolean preInBack;
private boolean vailDispatch; //校验是否可配送
private int vailGroupBuy; //校验是否集采产品 0:全部1只采集集采产品2只采集非集采产品
}

@ -83,9 +83,13 @@ public class UdiRelevanceSaveRequest {
private String basicPrductRemak7;
private String basicPrductRemak8;
private String price;
private Integer useExpireTime;
//关联修改提交:true;单独提交:false
private Boolean relSubmit;
private boolean dispatch; //是否可配送
private boolean groupBuy; //是否集采产品
}

@ -123,5 +123,8 @@ public class BasicBussinessTypeResponse {
*/
private String originAction;
private boolean vailDispatch; //校验是否可配送
private int vailGroupBuy; //校验是否集采产品 0:全部1只采集集采产品2只采集非集采产品
}

@ -88,6 +88,8 @@ public class UdiRelevanceResponse {
private Boolean bindCheck;
private Integer useExpireTime;
//关联查询字典
private String unitFk; //供应商ID
@ -95,6 +97,8 @@ public class UdiRelevanceResponse {
//手持终端下载需要主键
private Long relId;
private boolean dispatch; //是否可配送
private boolean groupBuy; //是否集采产品
public int getBhzxxsbzsl() {
if (bhzxxsbzsl == null || bhzxxsbzsl == 0) {

@ -54,70 +54,70 @@
<insert id="insertIgnoreBussinessType" parameterType="com.glxp.api.entity.basic.BasicBussinessTypeEntity">
insert
ignore into basic_bussiness_type (mainAction, action, name, enable, remark, thirdSysFk, genUnit,
innerOrder, secCheckEnable, checkEnable, checkUdims, checkPdaEd,
checkPdaUn, checkPc, checkWebNew, checkSp, checkChange, secCheckUdims,
secCheckPdaEd, secCheckPdaUn, secCheckPc, secCheckWebNew,
secCheckChange, secCheckSp, corpType, supplementOrderType,
checkBalance, secCheckBalance, useDyCount, expireTip, updateTime,
defaultUnit, prefix, outToSpms, ullageFill, scanPreIn, vailInv,
entrutSpms, codeFillCheck, defaultSubInv, defaultInv, orderVisibleType,
checkCopy, secCheckCopy, originAction, advanceType, changeEnable,
spUse, preIn, supplementAll, createUser, createTime,preInBack)
values (
#{mainAction},
#{action},
#{name},
#{enable},
#{remark},
#{thirdSysFk},
#{genUnit},
#{innerOrder},
#{secCheckEnable},
#{checkEnable},
#{checkUdims},
#{checkPdaEd},
#{checkPdaUn},
#{checkPc},
#{checkWebNew},
#{checkSp},
#{checkChange},
#{secCheckUdims},
#{secCheckPdaEd},
#{secCheckPdaUn},
#{secCheckPc},
#{secCheckWebNew},
#{secCheckChange},
#{secCheckSp},
#{corpType},
#{supplementOrderType},
#{checkBalance},
#{secCheckBalance},
#{useDyCount},
#{expireTip},
#{updateTime},
#{defaultUnit},
#{prefix},
#{outToSpms},
#{ullageFill},
#{scanPreIn},
#{vailInv},
#{entrutSpms},
#{codeFillCheck},
#{defaultSubInv},
#{defaultInv},
#{orderVisibleType},
#{checkCopy},
#{secCheckCopy},
#{originAction},
#{advanceType},
#{changeEnable},
#{spUse},
#{preIn},
#{supplementAll},
#{createUser},
#{createTime},#{preInBack}
)
ignore
into basic_bussiness_type (mainAction, action, name, enable, remark, thirdSysFk, genUnit,
innerOrder, secCheckEnable, checkEnable, checkUdims, checkPdaEd,
checkPdaUn, checkPc, checkWebNew, checkSp, checkChange, secCheckUdims,
secCheckPdaEd, secCheckPdaUn, secCheckPc, secCheckWebNew,
secCheckChange, secCheckSp, corpType, supplementOrderType,
checkBalance, secCheckBalance, useDyCount, expireTip, updateTime,
defaultUnit, prefix, outToSpms, ullageFill, scanPreIn, vailInv,
entrutSpms, codeFillCheck, defaultSubInv, defaultInv, orderVisibleType,
checkCopy, secCheckCopy, originAction, advanceType, changeEnable,
spUse, preIn, supplementAll, createUser, createTime, preInBack, vailDispatch,
vailGroupBuy)
values (#{mainAction},
#{action},
#{name},
#{enable},
#{remark},
#{thirdSysFk},
#{genUnit},
#{innerOrder},
#{secCheckEnable},
#{checkEnable},
#{checkUdims},
#{checkPdaEd},
#{checkPdaUn},
#{checkPc},
#{checkWebNew},
#{checkSp},
#{checkChange},
#{secCheckUdims},
#{secCheckPdaEd},
#{secCheckPdaUn},
#{secCheckPc},
#{secCheckWebNew},
#{secCheckChange},
#{secCheckSp},
#{corpType},
#{supplementOrderType},
#{checkBalance},
#{secCheckBalance},
#{useDyCount},
#{expireTip},
#{updateTime},
#{defaultUnit},
#{prefix},
#{outToSpms},
#{ullageFill},
#{scanPreIn},
#{vailInv},
#{entrutSpms},
#{codeFillCheck},
#{defaultSubInv},
#{defaultInv},
#{orderVisibleType},
#{checkCopy},
#{secCheckCopy},
#{originAction},
#{advanceType},
#{changeEnable},
#{spUse},
#{preIn},
#{supplementAll},
#{createUser},
#{createTime}, #{preInBack}, #{vailDispatch}, #{vailGroupBuy})
</insert>
<select id="selectBusList" resultType="com.glxp.api.entity.basic.BasicBussinessTypeEntity">
@ -173,7 +173,8 @@
select action, name
from basic_bussiness_type
where action not in (
select code from thr_system_bus_api)
select code
from thr_system_bus_api)
</select>
<select id="selectCandidateBusType" resultType="com.glxp.api.entity.basic.BasicBussinessTypeEntity">
@ -182,13 +183,13 @@
where mainAction = #{mainAction}
and corpType = 3
and (supplementOrderType is null
or supplementOrderType = '')
or supplementOrderType = '')
</select>
<select id="selectByUser" resultType="com.glxp.api.entity.basic.BasicBussinessTypeEntity">
select basic_bussiness_type.*
from basic_bussiness_type
inner join auth_user_bustype on basic_bussiness_type.action = auth_user_bustype.scAction
inner join auth_user_bustype on basic_bussiness_type.action = auth_user_bustype.scAction
<where>
<if test="name != null and name != ''">
AND basic_bussiness_type.name like concat('%', #{name}, '%')
@ -216,7 +217,7 @@
resultType="com.glxp.api.res.basic.BasicBussinessTypeResponse">
SELECT basic_bussiness_type.*
FROM basic_bussiness_type
INNER JOIN auth_user_bustype ON basic_bussiness_type.action = auth_user_bustype.scAction
INNER JOIN auth_user_bustype ON basic_bussiness_type.action = auth_user_bustype.scAction
<where>
<if test="name != ''and name != null">
AND basic_bussiness_type.name LIKE concat('%', #{name}, '%')
@ -241,6 +242,8 @@
</select>
<select id="selectNameByAction" resultType="java.lang.String">
select name from basic_bussiness_type where action = #{action}
select name
from basic_bussiness_type
where action = #{action}
</select>
</mapper>

@ -301,8 +301,8 @@
basic_products.basicPrductRemak6,
basic_products.basicPrductRemak7,
basic_products.basicPrductRemak8
FROM basic_products
inner JOIN basic_udirel
FROM basic_products
inner JOIN basic_udirel
ON basic_products.uuid = basic_udirel.uuid
<where>
<if test="ylqxzcrbarmc != '' and ylqxzcrbarmc != null">
@ -312,7 +312,8 @@
AND relCode = #{relCode}
</if>
<if test="bindType != '' and bindType != null">
AND relCode is null or trim(relCode)=''
AND relCode is null
or trim(relCode) = ''
</if>
<if test="supName != '' and supName != null">
AND supName LIKE concat('%', #{supName}, '%')
@ -328,9 +329,9 @@
</if>
<if test="unionCode != '' and unionCode != null">
and (
nameCode LIKE concat('%', #{unionCode}, '%')
or ybbm LIKE concat('%', #{unionCode}, '%')
or sptm LIKE concat('%', #{unionCode}, '%'))
nameCode LIKE concat('%', #{unionCode}, '%')
or ybbm LIKE concat('%', #{unionCode}, '%')
or sptm LIKE concat('%', #{unionCode}, '%'))
</if>
<if test="isDisable == false">
AND (basic_udirel.isDisable is null or basic_udirel.isDisable = false)
@ -360,30 +361,30 @@
<if test="filterType != null and filterType == 1">
AND (thirdId <![CDATA[<>]]> '' or thirdId1 <![CDATA[<>]]> '' or thirdId2 <![CDATA[<>]]> '' or
thirdId3 <![CDATA[<>]]> '' or thirdId4 <![CDATA[<>]]> '')
and basic_products.originUuid <![CDATA[<>]]> ''
and basic_products.originUuid <![CDATA[<>]]> ''
</if>
<if test="filterType != null and filterType == 2">
AND basic_products.originUuid is NULL
</if>
<if test="filterType != null and filterType == 3">
AND (mainId is NULL or mainId = '')
and basic_products.originUuid <![CDATA[<>]]> ''
and basic_products.originUuid <![CDATA[<>]]> ''
</if>
<if test="filterType != null and filterType == 4">
AND thirdId1 is NULL
and basic_products.originUuid <![CDATA[<>]]> ''
and basic_products.originUuid <![CDATA[<>]]> ''
</if>
<if test="filterType != null and filterType == 5">
AND thirdId2 is NULL
and basic_products.originUuid <![CDATA[<>]]> ''
and basic_products.originUuid <![CDATA[<>]]> ''
</if>
<if test="filterType != null and filterType == 6">
AND thirdId3 is NULL
and basic_products.originUuid <![CDATA[<>]]> ''
and basic_products.originUuid <![CDATA[<>]]> ''
</if>
<if test="filterType != null and filterType == 7">
AND thirdId4 is NULL
and basic_products.originUuid <![CDATA[<>]]> ''
and basic_products.originUuid <![CDATA[<>]]> ''
</if>
<if test="filterType != null and filterType == 10">
AND basic_udirel.updateTime is NULL
@ -586,7 +587,7 @@
isLock,
lockStatus, isAdavence, useMuti, useNum, supName, createTime, updateTime, modifyTime, createUser,
updateUser,
remark)
remark, useExpireTime, dispatch, groupBuy)
values (#{id},
#{uuid},
#{mainId},
@ -609,7 +610,7 @@
#{modifyTime},
#{createUser},
#{updateUser},
#{remark})
#{remark}, #{useExpireTime}, #{dispatch}, #{groupBuy})
</insert>
<insert id="insertUdiRelevanceignore" keyProperty="id"
@ -621,7 +622,7 @@
isLock,
lockStatus, isAdavence, useMuti, useNum, supName, createTime, updateTime, modifyTime, createUser,
updateUser,
remark)
remark, useExpireTime, dispatch, groupBuy)
values (#{id},
#{uuid},
#{mainId},
@ -644,7 +645,7 @@
#{modifyTime},
#{createUser},
#{updateUser},
#{remark})
#{remark}, #{useExpireTime}, #{dispatch}, #{groupBuy})
</insert>
<delete id="deleteById" parameterType="Map">
@ -736,6 +737,15 @@
<if test="remark != null">
remark=#{remark},
</if>
<if test="useExpireTime != null">
useExpireTime=#{useExpireTime},
</if>
<if test="dispatch != null">
dispatch=#{dispatch},
</if>
<if test="groupBuy != null">
groupBuy=#{groupBuy},
</if>
</trim>
WHERE id = #{id}
</update>
@ -763,7 +773,7 @@
isLock,
lockStatus, isAdavence, useMuti, useNum, supName, createTime, updateTime, modifyTime, createUser,
updateUser,
remark)
remark, useExpireTime, dispatch, groupBuy)
values
<foreach collection="udiRelevanceEntities" item="item" index="index" separator=",">
@ -789,7 +799,7 @@
#{item.modifyTime},
#{item.createUser},
#{item.updateUser},
# {item.remark})
#{item.remark}, #{item.useExpireTime}, #{item.dispatch}, #{item.groupBuy})
</foreach>
</insert>
@ -862,7 +872,6 @@
<if test="isDisable != null and isDisable == false">
AND (isDisable is null or isDisable = false)
</if>
</where>
group by basic_udirel.id
@ -878,11 +887,9 @@
<update id="updateBatchById" parameterType="java.util.List">
<foreach collection="list" item="item" separator=";">
update
basic_udirel
set
`relCode` = #{item.relCode}
where
id = #{item.id}
basic_udirel
set `relCode` = #{item.relCode}
where id = #{item.id}
</foreach>
</update>

@ -33,7 +33,7 @@
company_product_relevance.customerId,
company_product_relevance.auditStatus,
basic_udirel.thirdId,
basic_udirel.id rlId,
basic_udirel.id rlId,
basic_udirel.isUseDy,
basic_udirel.isLock,
basic_udirel.thirdId1,
@ -94,14 +94,14 @@
basic_products.basicPrductRemak6,
basic_products.basicPrductRemak7,
basic_products.basicPrductRemak8,
basic_corp.name companyName,
basic_corp.name companyName,
company_product_relevance.price
FROM company_product_relevance
inner JOIN basic_udirel
ON company_product_relevance.udiRlIdFk = basic_udirel.id
inner JOIN basic_products
ON basic_udirel.uuid = basic_products.uuid
left JOIN basic_corp on basic_corp.erpId = company_product_relevance.customerId
inner JOIN basic_udirel
ON company_product_relevance.udiRlIdFk = basic_udirel.id
inner JOIN basic_products
ON basic_udirel.uuid = basic_products.uuid
left JOIN basic_corp on basic_corp.erpId = company_product_relevance.customerId
<where>
<if test="ylqxzcrbarmc != '' and ylqxzcrbarmc != null">
@ -119,18 +119,18 @@
<if test="unionCode != '' and unionCode != null">
and (
nameCode LIKE concat('%', #{unionCode}, '%')
or basic_products.ybbm LIKE concat('%', #{unionCode}, '%')
or basic_products.sptm LIKE concat('%', #{unionCode}, '%')
)
or basic_products.ybbm LIKE concat('%', #{unionCode}, '%')
or basic_products.sptm LIKE concat('%', #{unionCode}, '%')
)
</if>
<if test="thrPiId != '' and thrPiId != null">
and (
basic_udirel.thirdId LIKE concat('%', #{thrPiId}, '%')
or basic_udirel.thirdId1 LIKE concat('%', #{thrPiId}, '%')
or basic_udirel.thirdId2 LIKE concat('%', #{thrPiId}, '%')
or basic_udirel.thirdId3 LIKE concat('%', #{thrPiId}, '%')
or basic_udirel.thirdId4 LIKE concat('%', #{thrPiId}, '%')
)
or basic_udirel.thirdId1 LIKE concat('%', #{thrPiId}, '%')
or basic_udirel.thirdId2 LIKE concat('%', #{thrPiId}, '%')
or basic_udirel.thirdId3 LIKE concat('%', #{thrPiId}, '%')
or basic_udirel.thirdId4 LIKE concat('%', #{thrPiId}, '%')
)
</if>
<if test="uuid != '' and uuid != null">
AND basic_udirel.uuid = #{uuid}
@ -275,47 +275,45 @@
<insert id="insertCompanyProductRelevance"
parameterType="com.glxp.api.entity.basic.UdiRlSupEntity">
replace
INTO company_product_relevance(customerId,productId,enterpriseId,registrationId,
createTime,updateTime,auditStatus,productUuid,udiRlIdFk,unitFk,price,createUser,updateUser) values
(
#{customerId},
#{productId},
#{enterpriseId},
#{registrationId},
#{createTime},
#{updateTime},
#{auditStatus},
#{productUuid},
#{udiRlIdFk},
#{unitFk},
#{price},
#{createUser},
#{updateUser}
)
INTO company_product_relevance(customerId, productId, enterpriseId, registrationId,
createTime, updateTime, auditStatus, productUuid, udiRlIdFk, unitFk,
price, createUser, updateUser)
values (#{customerId},
#{productId},
#{enterpriseId},
#{registrationId},
#{createTime},
#{updateTime},
#{auditStatus},
#{productUuid},
#{udiRlIdFk},
#{unitFk},
#{price},
#{createUser},
#{updateUser})
</insert>
<insert id="importCompanyProductRelevance"
parameterType="com.glxp.api.entity.basic.UdiRlSupEntity">
replace
INTO company_product_relevance(id,customerId,productId,enterpriseId,registrationId,
createTime,updateTime,auditStatus,productUuid,udiRlIdFk,unitFk,price,createUser,updateUser) values
(
#{id},
#{customerId},
#{productId},
#{enterpriseId},
#{registrationId},
#{createTime},
#{updateTime},
#{auditStatus},
#{productUuid},
#{udiRlIdFk},
#{unitFk},
#{price},
#{createUser},
#{updateUser}
)
INTO company_product_relevance(id, customerId, productId, enterpriseId, registrationId,
createTime, updateTime, auditStatus, productUuid, udiRlIdFk, unitFk,
price, createUser, updateUser)
values (#{id},
#{customerId},
#{productId},
#{enterpriseId},
#{registrationId},
#{createTime},
#{updateTime},
#{auditStatus},
#{productUuid},
#{udiRlIdFk},
#{unitFk},
#{price},
#{createUser},
#{updateUser})
</insert>
<delete id="deleteById" parameterType="Map">
@ -338,6 +336,8 @@
</select>
<select id="selectUnitFkByRelId" resultType="java.lang.String">
select unitFk from company_product_relevance where udiRlIdFk = #{relId}
select unitFk
from company_product_relevance
where udiRlIdFk = #{relId}
</select>
</mapper>

@ -33,4 +33,4 @@
</where>
order by irs.updateTime desc
</select>
</mapper>
</mapper>

@ -12,5 +12,8 @@ CALL Pro_Temp_ColumnWork('auth_warehouse', 'advanceType', 'tinyint', 1);
CALL Pro_Temp_ColumnWork('basic_udirel', 'relCode', 'varchar(255) ', 1);
CALL Pro_Temp_ColumnWork('basic_udirel', 'lowStockNum', 'varchar(255) ', 1);
CALL Pro_Temp_ColumnWork('basic_udirel', 'useExpireTime', 'int', 1);
CALL Pro_Temp_ColumnWork('basic_udirel', 'dispatch', 'tinyint', 1);
CALL Pro_Temp_ColumnWork('basic_udirel', 'groupBuy', 'tinyint', 1);
CALL Pro_Temp_ColumnWork('basic_bussiness_type', 'vailDispatch', 'tinyint', 1);
CALL Pro_Temp_ColumnWork('basic_bussiness_type', 'vailGroupBuy', 'tinyint', 1);

Loading…
Cancel
Save