Merge remote-tracking branch 'origin/dev_drug' into dev_drug

# Conflicts:
#	src/main/resources/mybatis/mapper/thrsys/ThirdAliDrugMapper.xml
dev_unify
yewj 8 months ago
commit 33147dbece

@ -43,7 +43,7 @@ public class ThirdAliDrugService extends ServiceImpl<ThirdAliDrugMapper, ThirdAl
} }
log.info(file.getSize() + "文件长度"); log.info(file.getSize() + "文件长度");
if (file.getSize() > 100 * 1024 * 1024) { if (file.getSize() > 100 * 1024 * 1024) {
throw new JsonException("上传文件超过10M"); throw new JsonException("上传文件超过100M");
} }
List<ThirdAliDrug> thirdAliDrugs = new ArrayList<>(); List<ThirdAliDrug> thirdAliDrugs = new ArrayList<>();
String customerId = customerService.getCustomerId(); String customerId = customerService.getCustomerId();

@ -38,49 +38,50 @@
</sql> </sql>
<select id="selectDrugsByNameCodes" resultType="int"> <select id="selectDrugsByNameCodes" resultType="int">
SELECT count(1) SELECT count(1) FROM third_ali_drug WHERE nameCode = #{nameCode}
FROM third_ali_drug
WHERE nameCode = #{nameCode}
</select> </select>
<!-- 自定义saveOrUpdateBatch方法 --> <!-- 自定义saveOrUpdateBatch方法 -->
<insert id="saveOrUpdateBatch" parameterType="com.glxp.api.entity.thrsys.ThirdAliDrug"> <insert id="saveOrUpdateBatch" parameterType="com.glxp.api.entity.thrsys.ThirdAliDrug">
replace INTO third_ali_drug (`type`, manufacturer, cpmctymc, form, formSpec, bzgg, spmc, nameCode, packRatio, replace INTO third_ali_drug (`type`, manufacturer, cpmctymc, form, formSpec, bzgg, spmc, nameCode, packRatio,
packLevel, createTime, updateTime, erpId, approvalNum) packLevel, createTime, updateTime, erpId, approvalNum)
VALUES VALUES
<foreach collection="list" item="item" separator="," index="index"> <foreach collection="list" item="item" separator="," index="index">
(#{item.type}, #{item.manufacturer}, #{item.cpmctymc}, #{item.form}, #{item.formSpec}, #{item.bzgg}, (#{item.type}, #{item.manufacturer}, #{item.cpmctymc}, #{item.form}, #{item.formSpec}, #{item.bzgg},
#{item.spmc}, #{item.nameCode}, #{item.spmc}, #{item.nameCode},
#{item.packRatio}, #{item.packLevel}, #{item.createTime}, #{item.updateTime}, #{item.erpId}, #{item.packRatio}, #{item.packLevel}, #{item.createTime}, #{item.updateTime}, #{item.erpId},
#{item.approvalNum}) #{item.approvalNum})
</foreach> </foreach>
</insert> </insert>
<select id="filterList" parameterType="com.glxp.api.req.thrsys.ThirdAliDrugRequest"
resultType="com.glxp.api.entity.thrsys.ThirdAliDrug"> <select id="filterList" parameterType="com.glxp.api.req.thrsys.ThirdAliDrugRequest" resultType="com.glxp.api.entity.thrsys.ThirdAliDrug">
select id, select
`type`, id,
manufacturer, `type`,
cpmctymc, manufacturer,
form, cpmctymc,
formSpec, form,
bzgg, formSpec,
spmc, bzgg,
nameCode, spmc,
packRatio, nameCode,
packLevel, packRatio,
createTime, packLevel,
erpId, createTime,
updateTime erpId,
from third_ali_drug updateTime,
<where> approvalNum
<if test="cpmctymc != '' and cpmctymc != null"> from third_ali_drug
AND cpmctymc LIKE concat('%', #{cpmctymc}, '%') <where>
</if> <if test="cpmctymc != '' and cpmctymc != null">
<if test="nameCode != '' and nameCode != null"> AND cpmctymc LIKE concat('%', #{cpmctymc}, '%')
AND nameCode LIKE concat('%', #{nameCode}, '%') </if>
</if> <if test="nameCode != '' and nameCode != null">
</where> AND nameCode LIKE concat('%', #{nameCode}, '%')
</select> </if>
</where>
</select>
</mapper> </mapper>
Loading…
Cancel
Save