feat: DI选入审核时进行是否需要扫码初始化

dev_ksck_axxyy
chenhc 9 months ago
parent 3a52a67c49
commit 5fd6f0511f

@ -15,8 +15,10 @@ import com.glxp.api.common.res.BaseResponse;
import com.glxp.api.common.util.ResultVOUtils;
import com.glxp.api.constant.BasicProcessStatus;
import com.glxp.api.constant.BusinessType;
import com.glxp.api.dao.system.ClassifyCodeDao;
import com.glxp.api.entity.auth.AuthAdmin;
import com.glxp.api.entity.basic.*;
import com.glxp.api.entity.system.ClassifyCodeEntity;
import com.glxp.api.entity.thrsys.ThrProductsAddDiEntity;
import com.glxp.api.entity.thrsys.ThrProductsEntity;
import com.glxp.api.entity.thrsys.ThrSystemEntity;
@ -164,6 +166,8 @@ public class ThrProductsAddDiController {
@Resource
ThrSystemService thrSystemService;
@Resource
ClassifyCodeDao classifyCodeDao;
/**
* DI
@ -328,6 +332,17 @@ public class ThrProductsAddDiController {
udiRelevanceEntity.setAttributeType(thrProductsAddDiResponse.getAttributeType());
udiRelevanceEntity.setHcType(thrProductsAddDiResponse.getHcType());
String flbm = thrProductsAddDiResponse.getFlbm();
//是否需要扫码 初始化
if (StrUtil.isNotEmpty(flbm)){
ClassifyCodeEntity classifyCodeEntity = classifyCodeDao.ClassifyByCode(flbm);
if (classifyCodeEntity != null){
udiProductEntity.setRequireScanCode(1);
}else {
udiProductEntity.setRequireScanCode(0);
}
}
udiProductEntity.setNameCode(null);
udiProductService.updateUdiInfoByUuid(udiProductEntity);
UdiRelevanceEntity udiRelevanceEntity1 = new UdiRelevanceEntity();

@ -3,6 +3,7 @@ package com.glxp.api.dao.system;
import com.glxp.api.entity.system.ClassifyCodeEntity;
import com.glxp.api.req.system.FilterClassifyCodeRequest;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
@ -10,4 +11,6 @@ import java.util.List;
public interface ClassifyCodeDao {
List<ClassifyCodeEntity> filteClassifyCode(FilterClassifyCodeRequest filterClassifyCodeRequest);
ClassifyCodeEntity ClassifyByCode(@Param("code") String code);
}

@ -32,4 +32,14 @@
</where>
</select>
<select id="ClassifyByCode" parameterType="string" resultType="com.glxp.api.entity.system.ClassifyCodeEntity">
SELECT tmpc.*
FROM thr_medical_product_category tmpc
<where>
<if test="code != null and code != '' ">
tmpc.materialCode = #{code}
</if>
</where>
</select>
</mapper>

Loading…
Cancel
Save