基础信息相关修改

pro^2
anthonywj 2 years ago
parent b295e9e811
commit 287b8e762a

@ -69,7 +69,7 @@ public class IoCodeController extends BaseController {
} }
/** /**
* * +
* *
* @param filterCodeRequest * @param filterCodeRequest
* @return * @return

@ -20,6 +20,9 @@ public interface UdiProductDao {
List<UdiProductEntity> findByUuids(@Param("uuid") String uuid); List<UdiProductEntity> findByUuids(@Param("uuid") String uuid);
List<UdiProductEntity> findByOriginUuid(@Param("originUuid") String originUuid);
UdiProductEntity findById(@Param("id") String id); UdiProductEntity findById(@Param("id") String id);
boolean insertUdiInfo(UdiProductEntity udiProductEntity); boolean insertUdiInfo(UdiProductEntity udiProductEntity);

@ -66,6 +66,7 @@ public class ProductInfoEntity {
private String syqsfxyjxmj; private String syqsfxyjxmj;
private String qtxxdwzlj; private String qtxxdwzlj;
private String mjfs; private String mjfs;
private String categoryName;
//自定义字典 //自定义字典

@ -65,6 +65,16 @@ public class UdiProductEntity {
private String price; private String price;
private String sfwblztlcp;
private String cgzmraqxgxx;
private String sfbjwycxsy;
private String zdcfsycs;
private String sfwwjbz;
private String syqsfxyjxmj;
private String mjfs;
private String categoryName;
//本地生成信息 //本地生成信息
private String batchNo; private String batchNo;
private String produceDate; private String produceDate;

@ -111,6 +111,15 @@ public class UdiRelevanceResponse {
private String certIdFk; private String certIdFk;
private String sfwblztlcp;
private String cgzmraqxgxx;
private String sfbjwycxsy;
private String zdcfsycs;
private String sfwwjbz;
private String syqsfxyjxmj;
private String mjfs;
private String categoryName;
public int getBhzxxsbzsl() { public int getBhzxxsbzsl() {
if (bhzxxsbzsl == null || bhzxxsbzsl == 0) { if (bhzxxsbzsl == null || bhzxxsbzsl == 0) {
@ -137,6 +146,7 @@ public class UdiRelevanceResponse {
return false; return false;
return allowNoProduct; return allowNoProduct;
} }
public Boolean getAllowNoSerial() { public Boolean getAllowNoSerial() {
if (allowNoSerial == null) if (allowNoSerial == null)
return false; return false;

@ -23,12 +23,14 @@ public interface UdiProductService {
UdiProductEntity findByNameCode(String nameCode); UdiProductEntity findByNameCode(String nameCode);
UdiProductEntity findById(@Param("id") String id); UdiProductEntity findById(String id);
UdiProductEntity findByUuid(String uuid); UdiProductEntity findByUuid(String uuid);
List<UdiProductEntity> findByUuids(String uuid); List<UdiProductEntity> findByUuids(String uuid);
List<UdiProductEntity> findByOriginUuid(String originUuid);
boolean insertUdiInfo(UdiProductEntity udiProductEntity); boolean insertUdiInfo(UdiProductEntity udiProductEntity);
boolean insertUdiInfos(List<UdiProductEntity> udiInfoEntities); boolean insertUdiInfos(List<UdiProductEntity> udiInfoEntities);

@ -96,6 +96,11 @@ public class UdiProductServiceImpl implements UdiProductService {
return udiProductDao.findByUuids(uuid); return udiProductDao.findByUuids(uuid);
} }
@Override
public List<UdiProductEntity> findByOriginUuid(String originUuid) {
return udiProductDao.findByOriginUuid(originUuid);
}
@Override @Override
public boolean insertUdiInfo(UdiProductEntity udiProductEntity) { public boolean insertUdiInfo(UdiProductEntity udiProductEntity) {
udiProductEntity.setUpdateTime(new Date()); udiProductEntity.setUpdateTime(new Date());

@ -1,9 +1,13 @@
package com.glxp.api.task; package com.glxp.api.task;
import cn.hutool.core.exceptions.ExceptionUtil;
import cn.hutool.core.util.StrUtil;
import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONArray;
import com.glxp.api.constant.AsyncDiDlHelper; import com.glxp.api.constant.AsyncDiDlHelper;
import com.glxp.api.entity.basic.ProductInfoEntity; import com.glxp.api.entity.basic.ProductInfoEntity;
import com.glxp.api.entity.basic.UdiProductEntity;
import com.glxp.api.service.basic.ProductInfoService; import com.glxp.api.service.basic.ProductInfoService;
import com.glxp.api.service.basic.UdiProductService;
import com.glxp.api.util.CustomUtil; import com.glxp.api.util.CustomUtil;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
@ -25,8 +29,12 @@ public class AsyncDiDlService {
ProductInfoService productInfoService; ProductInfoService productInfoService;
@Resource @Resource
AsyncDiDlHelper asyncDiDlHelper; AsyncDiDlHelper asyncDiDlHelper;
@Resource
UdiProductService udiProductService;
private static final Logger logger = LoggerFactory.getLogger(AsyncDiDlService.class); private static final Logger logger = LoggerFactory.getLogger(AsyncDiDlService.class);
@Async @Async
public void asyncDiByTime(String updateTime) { public void asyncDiByTime(String updateTime) {
int page = 1; int page = 1;
@ -35,6 +43,109 @@ public class AsyncDiDlService {
logger.info("更新时间:" + updateTime + "----" + page + "----" + limit); logger.info("更新时间:" + updateTime + "----" + page + "----" + limit);
List<ProductInfoEntity> productInfoEntityList = asyncDiDlHelper.dlByTime(udiUrl, page, limit, updateTime); List<ProductInfoEntity> productInfoEntityList = asyncDiDlHelper.dlByTime(udiUrl, page, limit, updateTime);
if (productInfoEntityList != null && productInfoEntityList.size() > 0) { if (productInfoEntityList != null && productInfoEntityList.size() > 0) {
try {
for (ProductInfoEntity productInfoEntity : productInfoEntityList) {
UdiProductEntity udiProductEntity = udiProductService.findByNameCode(productInfoEntity.getNameCode());
//更新物资字典基础信息
if (StrUtil.isNotEmpty(productInfoEntity.getPackRatio()))
udiProductEntity.setPackRatio(productInfoEntity.getPackRatio());
if (StrUtil.isNotEmpty(productInfoEntity.getPackLevel()))
udiProductEntity.setPackLevel(productInfoEntity.getPackLevel());
if (productInfoEntity.getBhxjsl() != null)
udiProductEntity.setBhxjsl(productInfoEntity.getBhxjsl());
if (productInfoEntity.getBhzxxsbzsl() != null)
udiProductEntity.setBhzxxsbzsl(productInfoEntity.getBhzxxsbzsl());
if (productInfoEntity.getZxxsbzbhsydysl() != null)
udiProductEntity.setZxxsbzbhsydysl(productInfoEntity.getZxxsbzbhsydysl());
if (StrUtil.isNotEmpty(productInfoEntity.getBhxjcpbm()))
udiProductEntity.setBhxjcpbm(productInfoEntity.getBhxjcpbm());
if (StrUtil.isNotEmpty(productInfoEntity.getSjcpbm()))
udiProductEntity.setSjcpbm(productInfoEntity.getSjcpbm());
if (StrUtil.isNotEmpty(productInfoEntity.getBzcj()))
udiProductEntity.setBzcj(productInfoEntity.getBzcj());
if (StrUtil.isNotEmpty(productInfoEntity.getCpmctymc()))
udiProductEntity.setCpmctymc(productInfoEntity.getCpmctymc());
if (StrUtil.isNotEmpty(productInfoEntity.getCplb()))
udiProductEntity.setCplb(productInfoEntity.getCplb());
if (StrUtil.isNotEmpty(productInfoEntity.getFlbm()))
udiProductEntity.setFlbm(productInfoEntity.getFlbm());
if (StrUtil.isNotEmpty(productInfoEntity.getGgxh()))
udiProductEntity.setGgxh(productInfoEntity.getGgxh());
if (StrUtil.isNotEmpty(productInfoEntity.getQxlb()))
udiProductEntity.setQxlb(productInfoEntity.getQxlb());
if (StrUtil.isNotEmpty(productInfoEntity.getTyshxydm()))
udiProductEntity.setTyshxydm(productInfoEntity.getTyshxydm());
if (StrUtil.isNotEmpty(productInfoEntity.getYlqxzcrbarmc()))
udiProductEntity.setYlqxzcrbarmc(productInfoEntity.getYlqxzcrbarmc());
if (StrUtil.isNotEmpty(productInfoEntity.getYlqxzcrbarywmc()))
udiProductEntity.setYlqxzcrbarywmc(productInfoEntity.getYlqxzcrbarywmc());
if (StrUtil.isNotEmpty(productInfoEntity.getSydycpbs()))
udiProductEntity.setSydycpbs(productInfoEntity.getSydycpbs());
if (productInfoEntity.getVersionNumber() != null)
udiProductEntity.setVersionNumber(productInfoEntity.getVersionNumber());
if (StrUtil.isNotEmpty(productInfoEntity.getScbssfbhph())) {
udiProductEntity.setScbssfbhph(productInfoEntity.getScbssfbhph());
if (productInfoEntity.getScbssfbhph().equals("是")) {
udiProductEntity.setAllowNoBatch(false);
} else {
udiProductEntity.setAllowNoBatch(true);
}
}
if (StrUtil.isNotEmpty(productInfoEntity.getScbssfbhscrq())) {
udiProductEntity.setScbssfbhscrq(productInfoEntity.getScbssfbhscrq());
if (productInfoEntity.getScbssfbhscrq().equals("是")) {
udiProductEntity.setAllowNoProduct(false);
} else {
udiProductEntity.setAllowNoProduct(true);
}
}
if (StrUtil.isNotEmpty(productInfoEntity.getScbssfbhsxrq())) {
udiProductEntity.setScbssfbhsxrq(productInfoEntity.getScbssfbhsxrq());
if (productInfoEntity.getScbssfbhsxrq().equals("是")) {
udiProductEntity.setAllowNoExpire(false);
} else {
udiProductEntity.setAllowNoExpire(true);
}
}
if (StrUtil.isNotEmpty(productInfoEntity.getScbssfbhxlh())) {
udiProductEntity.setScbssfbhxlh(productInfoEntity.getScbssfbhxlh());
if (productInfoEntity.getScbssfbhxlh().equals("是")) {
udiProductEntity.setAllowNoSerial(false);
} else {
udiProductEntity.setAllowNoSerial(true);
}
}
if (StrUtil.isNotEmpty(productInfoEntity.getYbbm()))
udiProductEntity.setYbbm(productInfoEntity.getYbbm());
if (StrUtil.isNotEmpty(productInfoEntity.getCplx()))
udiProductEntity.setCplx(productInfoEntity.getCplx());
if (StrUtil.isNotEmpty(productInfoEntity.getHchzsb()))
udiProductEntity.setHchzsb(productInfoEntity.getHchzsb());
if (StrUtil.isNotEmpty(productInfoEntity.getSfwblztlcp()))
udiProductEntity.setSfwblztlcp(productInfoEntity.getSfwblztlcp());
if (StrUtil.isNotEmpty(productInfoEntity.getCgzmraqxgxx()))
udiProductEntity.setCgzmraqxgxx(productInfoEntity.getCgzmraqxgxx());
if (StrUtil.isNotEmpty(productInfoEntity.getSfbjwycxsy()))
udiProductEntity.setSfbjwycxsy(productInfoEntity.getSfbjwycxsy());
if (StrUtil.isNotEmpty(productInfoEntity.getZdcfsycs()))
udiProductEntity.setZdcfsycs(productInfoEntity.getZdcfsycs());
if (StrUtil.isNotEmpty(productInfoEntity.getSfwwjbz()))
udiProductEntity.setSfwwjbz(productInfoEntity.getSfwwjbz());
if (StrUtil.isNotEmpty(productInfoEntity.getSyqsfxyjxmj()))
udiProductEntity.setSyqsfxyjxmj(productInfoEntity.getSyqsfxyjxmj());
if (StrUtil.isNotEmpty(productInfoEntity.getMjfs()))
udiProductEntity.setMjfs(productInfoEntity.getMjfs());
if (StrUtil.isNotEmpty(productInfoEntity.getCategoryName()))
udiProductEntity.setCategoryName(productInfoEntity.getCategoryName());
udiProductService.updateUdiInfoById(udiProductEntity);
}
} catch (Exception e) {
e.printStackTrace();
logger.error(ExceptionUtil.getMessage(e));
}
productInfoService.insertProductInfos(productInfoEntityList); productInfoService.insertProductInfos(productInfoEntityList);
if (productInfoEntityList.size() < limit) { if (productInfoEntityList.size() < limit) {
break; break;

@ -2,19 +2,19 @@
<!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.dao.basic.ProductInfoDao"> <mapper namespace="com.glxp.api.dao.basic.ProductInfoDao">
<select id="filterProductInfo" parameterType="com.glxp.api.req.basic.ProductInfoFilterRequest" <select id="filterProductInfo" parameterType="com.glxp.api.req.basic.ProductInfoFilterRequest"
resultType="com.glxp.api.entity.basic.ProductInfoEntity"> resultType="com.glxp.api.entity.basic.ProductInfoEntity">
SELECT * FROM productinfo SELECT *
FROM productinfo
<where> <where>
<if test="ylqxzcrbarmc != '' and ylqxzcrbarmc != null"> <if test="ylqxzcrbarmc != '' and ylqxzcrbarmc != null">
AND ylqxzcrbarmc LIKE concat(#{ylqxzcrbarmc},'%') AND ylqxzcrbarmc LIKE concat(#{ylqxzcrbarmc}, '%')
</if> </if>
<if test="cpmctymc != '' and cpmctymc != null"> <if test="cpmctymc != '' and cpmctymc != null">
AND cpmctymc LIKE concat(#{cpmctymc},'%') AND cpmctymc LIKE concat(#{cpmctymc}, '%')
</if> </if>
<if test="nameCode != '' and nameCode != null"> <if test="nameCode != '' and nameCode != null">
AND nameCode LIKE concat(#{nameCode},'%') AND nameCode LIKE concat(#{nameCode}, '%')
</if> </if>
<if test="uuid != '' and uuid != null"> <if test="uuid != '' and uuid != null">
AND uuid = #{uuid} AND uuid = #{uuid}
@ -23,31 +23,31 @@
AND deviceRecordKey = #{deviceRecordKey} AND deviceRecordKey = #{deviceRecordKey}
</if> </if>
<if test="ggxh != '' and ggxh != null"> <if test="ggxh != '' and ggxh != null">
AND ggxh LIKE concat(#{ggxh},'%') AND ggxh LIKE concat(#{ggxh}, '%')
</if> </if>
<if test="tyshxydm != '' and tyshxydm != null"> <if test="tyshxydm != '' and tyshxydm != null">
AND tyshxydm = #{tyshxydm} AND tyshxydm = #{tyshxydm}
</if> </if>
<if test="updateTime!=null and updateTime!=''"> <if test="updateTime != null and updateTime != ''">
<![CDATA[ and updateTime>= DATE_FORMAT(#{updateTime}, '%Y-%m-%d %H:%i:%S') ]]> <![CDATA[
and updateTime >= DATE_FORMAT(#{updateTime}, '%Y-%m-%d %H:%i:%S')
]]>
</if> </if>
</where> </where>
</select> </select>
<select id="filterProductGroup" parameterType="com.glxp.api.req.basic.ProductInfoFilterRequest" <select id="filterProductGroup" parameterType="com.glxp.api.req.basic.ProductInfoFilterRequest"
resultType="com.glxp.api.entity.basic.ProductInfoEntity"> resultType="com.glxp.api.entity.basic.ProductInfoEntity">
SELECT * FROM productinfo SELECT *
FROM productinfo
<where> <where>
<if test="ylqxzcrbarmc != '' and ylqxzcrbarmc != null"> <if test="ylqxzcrbarmc != '' and ylqxzcrbarmc != null">
AND ylqxzcrbarmc LIKE concat(#{ylqxzcrbarmc},'%') AND ylqxzcrbarmc LIKE concat(#{ylqxzcrbarmc}, '%')
</if> </if>
<if test="cpmctymc != '' and cpmctymc != null"> <if test="cpmctymc != '' and cpmctymc != null">
AND cpmctymc LIKE concat(#{cpmctymc},'%') AND cpmctymc LIKE concat(#{cpmctymc}, '%')
</if> </if>
<if test="nameCode != '' and nameCode != null"> <if test="nameCode != '' and nameCode != null">
AND nameCode LIKE concat(#{nameCode},'%') AND nameCode LIKE concat(#{nameCode}, '%')
</if> </if>
<if test="uuid != '' and uuid != null"> <if test="uuid != '' and uuid != null">
AND uuid = #{uuid} AND uuid = #{uuid}
@ -56,13 +56,15 @@
AND deviceRecordKey = #{deviceRecordKey} AND deviceRecordKey = #{deviceRecordKey}
</if> </if>
<if test="ggxh != '' and ggxh != null"> <if test="ggxh != '' and ggxh != null">
AND ggxh LIKE concat(#{ggxh},'%') AND ggxh LIKE concat(#{ggxh}, '%')
</if> </if>
<if test="tyshxydm != '' and tyshxydm != null"> <if test="tyshxydm != '' and tyshxydm != null">
AND tyshxydm = #{tyshxydm} AND tyshxydm = #{tyshxydm}
</if> </if>
<if test="updateTime!=null and updateTime!=''"> <if test="updateTime != null and updateTime != ''">
<![CDATA[ and updateTime>= DATE_FORMAT(#{updateTime}, '%Y-%m-%d %H:%i:%S') ]]> <![CDATA[
and updateTime >= DATE_FORMAT(#{updateTime}, '%Y-%m-%d %H:%i:%S')
]]>
</if> </if>
</where> </where>
GROUP BY uuid GROUP BY uuid
@ -70,22 +72,25 @@
<select id="filterCpmctymc" parameterType="com.glxp.api.req.basic.ProductInfoFilterRequest" <select id="filterCpmctymc" parameterType="com.glxp.api.req.basic.ProductInfoFilterRequest"
resultType="com.glxp.api.entity.basic.ProductInfoEntity"> resultType="com.glxp.api.entity.basic.ProductInfoEntity">
select * from productinfo select *
from productinfo
<where> <where>
<if test="tyshxydm != '' and tyshxydm != null"> <if test="tyshxydm != '' and tyshxydm != null">
AND tyshxydm = #{tyshxydm} AND tyshxydm = #{tyshxydm}
</if> </if>
<if test="cpmctymc != '' and cpmctymc != null"> <if test="cpmctymc != '' and cpmctymc != null">
AND cpmctymc LIKE concat(#{cpmctymc},'%') AND cpmctymc LIKE concat(#{cpmctymc}, '%')
</if> </if>
<if test="nameCode != '' and nameCode != null"> <if test="nameCode != '' and nameCode != null">
AND nameCode LIKE concat(#{nameCode},'%') AND nameCode LIKE concat(#{nameCode}, '%')
</if> </if>
<if test="uuid != '' and uuid != null"> <if test="uuid != '' and uuid != null">
AND uuid = #{uuid} AND uuid = #{uuid}
</if> </if>
<if test="updateTime!=null and updateTime!=''"> <if test="updateTime != null and updateTime != ''">
<![CDATA[ and updateTime>= DATE_FORMAT(#{updateTime}, '%Y-%m-%d %H:%i:%S') ]]> <![CDATA[
and updateTime >= DATE_FORMAT(#{updateTime}, '%Y-%m-%d %H:%i:%S')
]]>
</if> </if>
</where> </where>
GROUP BY cpmctymc GROUP BY cpmctymc
@ -94,23 +99,26 @@
<select id="filterUdiByTyshxydm" parameterType="com.glxp.api.req.basic.ProductInfoFilterRequest" <select id="filterUdiByTyshxydm" parameterType="com.glxp.api.req.basic.ProductInfoFilterRequest"
resultType="com.glxp.api.entity.basic.ProductInfoEntity"> resultType="com.glxp.api.entity.basic.ProductInfoEntity">
SELECT * FROM productinfo SELECT *
FROM productinfo
<where> <where>
diType = 1 diType = 1
<if test="tyshxydm != '' and tyshxydm != null"> <if test="tyshxydm != '' and tyshxydm != null">
AND tyshxydm = #{tyshxydm} AND tyshxydm = #{tyshxydm}
</if> </if>
<if test="cpmctymc != '' and cpmctymc != null"> <if test="cpmctymc != '' and cpmctymc != null">
AND cpmctymc LIKE concat(#{cpmctymc},'%') AND cpmctymc LIKE concat(#{cpmctymc}, '%')
</if> </if>
<if test="nameCode != '' and nameCode != null"> <if test="nameCode != '' and nameCode != null">
AND nameCode LIKE concat(#{nameCode},'%') AND nameCode LIKE concat(#{nameCode}, '%')
</if> </if>
<if test="uuid != '' and uuid != null"> <if test="uuid != '' and uuid != null">
AND uuid = #{uuid} AND uuid = #{uuid}
</if> </if>
<if test="updateTime!=null and updateTime!=''"> <if test="updateTime != null and updateTime != ''">
<![CDATA[ and updateTime>= DATE_FORMAT(#{updateTime}, '%Y-%m-%d %H:%i:%S') ]]> <![CDATA[
and updateTime >= DATE_FORMAT(#{updateTime}, '%Y-%m-%d %H:%i:%S')
]]>
</if> </if>
</where> </where>
GROUP BY nameCode GROUP BY nameCode
@ -118,8 +126,9 @@
<select id="selectAllByUuid" parameterType="java.util.List" <select id="selectAllByUuid" parameterType="java.util.List"
resultType="com.glxp.api.entity.basic.ProductInfoEntity"> resultType="com.glxp.api.entity.basic.ProductInfoEntity">
select * from productinfo where select *
uuid in ( from productinfo where
uuid in (
<foreach collection="ids" item="item" index="index" <foreach collection="ids" item="item" index="index"
separator=","> separator=",">
#{item} #{item}
@ -137,27 +146,27 @@
<!-- CHAR_LENGTH(nameCode) <![CDATA[ >= ]]> 14--> <!-- CHAR_LENGTH(nameCode) <![CDATA[ >= ]]> 14-->
<select id="filterUdiByCreditNo" parameterType="com.glxp.api.req.basic.ProductInfoFilterRequest" <select id="filterUdiByCreditNo" parameterType="com.glxp.api.req.basic.ProductInfoFilterRequest"
resultType="com.glxp.api.entity.basic.ProductInfoEntity"> resultType="com.glxp.api.entity.basic.ProductInfoEntity">
select p.* from productinfo p
select p.* from productinfo p INNER JOIN INNER JOIN
(select deviceRecordKey ,max(versionNumber) versionNumber from productinfo (select deviceRecordKey, max(versionNumber) versionNumber
from productinfo
<where> <where>
<if test="tyshxydm != '' and tyshxydm != null"> <if test="tyshxydm != '' and tyshxydm != null">
AND tyshxydm = #{tyshxydm} AND tyshxydm = #{tyshxydm}
</if> </if>
<if test="cpmctymc != '' and cpmctymc != null"> <if test="cpmctymc != '' and cpmctymc != null">
AND cpmctymc LIKE concat(#{cpmctymc},'%') AND cpmctymc LIKE concat(#{cpmctymc}, '%')
</if> </if>
<if test="nameCode != '' and nameCode != null"> <if test="nameCode != '' and nameCode != null">
AND nameCode LIKE concat(#{nameCode},'%') AND nameCode LIKE concat(#{nameCode}, '%')
</if> </if>
<if test="uuid != '' and uuid != null"> <if test="uuid != '' and uuid != null">
AND uuid = #{uuid} AND uuid = #{uuid}
</if> </if>
</where> </where>
GROUP BY deviceRecordKey) GROUP BY deviceRecordKey)
a on p.deviceRecordKey = a.deviceRecordKey and p.versionNumber = a.versionNumber a on p.deviceRecordKey = a.deviceRecordKey and p.versionNumber = a.versionNumber
<where> <where>
<if test="diType != '' and diType != null"> <if test="diType != '' and diType != null">
AND diType = #{diType} AND diType = #{diType}
@ -168,17 +177,17 @@
<select id="filterUdiByNewest" parameterType="com.glxp.api.req.basic.ProductInfoFilterRequest" <select id="filterUdiByNewest" parameterType="com.glxp.api.req.basic.ProductInfoFilterRequest"
resultType="com.glxp.api.entity.basic.ProductInfoEntity"> resultType="com.glxp.api.entity.basic.ProductInfoEntity">
SELECT *
SELECT * FROM productinfo FROM productinfo
<where> <where>
<if test="tyshxydm != '' and tyshxydm != null"> <if test="tyshxydm != '' and tyshxydm != null">
AND tyshxydm = #{tyshxydm} AND tyshxydm = #{tyshxydm}
</if> </if>
<if test="cpmctymc != '' and cpmctymc != null"> <if test="cpmctymc != '' and cpmctymc != null">
AND cpmctymc LIKE concat(#{cpmctymc},'%') AND cpmctymc LIKE concat(#{cpmctymc}, '%')
</if> </if>
<if test="nameCode != '' and nameCode != null"> <if test="nameCode != '' and nameCode != null">
AND nameCode LIKE concat(#{nameCode},'%') AND nameCode LIKE concat(#{nameCode}, '%')
</if> </if>
<if test="uuid != '' and uuid != null"> <if test="uuid != '' and uuid != null">
AND uuid = #{uuid} AND uuid = #{uuid}
@ -191,72 +200,73 @@
<select id="filterUuidByCreditNo" parameterType="com.glxp.api.req.basic.ProductInfoFilterRequest" <select id="filterUuidByCreditNo" parameterType="com.glxp.api.req.basic.ProductInfoFilterRequest"
resultType="java.lang.String"> resultType="java.lang.String">
select p.uuid from productinfo p
select p.uuid from productinfo p INNER JOIN INNER JOIN
(select deviceRecordKey ,max(versionNumber) versionNumber from productinfo (select deviceRecordKey, max(versionNumber) versionNumber
from productinfo
<where> <where>
<if test="tyshxydm != '' and tyshxydm != null"> <if test="tyshxydm != '' and tyshxydm != null">
AND tyshxydm = #{tyshxydm} AND tyshxydm = #{tyshxydm}
</if> </if>
<if test="cpmctymc != '' and cpmctymc != null"> <if test="cpmctymc != '' and cpmctymc != null">
AND cpmctymc LIKE concat(#{cpmctymc},'%') AND cpmctymc LIKE concat(#{cpmctymc}, '%')
</if> </if>
<if test="nameCode != '' and nameCode != null"> <if test="nameCode != '' and nameCode != null">
AND nameCode LIKE concat(#{nameCode},'%') AND nameCode LIKE concat(#{nameCode}, '%')
</if> </if>
<if test="uuid != '' and uuid != null"> <if test="uuid != '' and uuid != null">
AND uuid = #{uuid} AND uuid = #{uuid}
</if> </if>
</where> </where>
GROUP BY deviceRecordKey) GROUP BY deviceRecordKey)
a on p.deviceRecordKey = a.deviceRecordKey and p.versionNumber = a.versionNumber a on p.deviceRecordKey = a.deviceRecordKey and p.versionNumber = a.versionNumber
group by uuid group by uuid
</select> </select>
<select id="filterUdi" parameterType="com.glxp.api.req.basic.ProductInfoFilterRequest" <select id="filterUdi" parameterType="com.glxp.api.req.basic.ProductInfoFilterRequest"
resultType="com.glxp.api.entity.basic.ProductInfoEntity"> resultType="com.glxp.api.entity.basic.ProductInfoEntity">
select *
select * from productinfo from productinfo
<where> <where>
<if test="ylqxzcrbarmc != '' and ylqxzcrbarmc != null"> <if test="ylqxzcrbarmc != '' and ylqxzcrbarmc != null">
AND ylqxzcrbarmc= #{ylqxzcrbarmc} AND ylqxzcrbarmc = #{ylqxzcrbarmc}
</if> </if>
<if test="ylqxzcrbarmc == '' and cpmctymc != '' and cpmctymc != null"> <if test="ylqxzcrbarmc == '' and cpmctymc != '' and cpmctymc != null">
AND cpmctymc LIKE concat(#{cpmctymc},'%') AND cpmctymc LIKE concat(#{cpmctymc}, '%')
</if> </if>
<if test="ylqxzcrbarmc != '' and ylqxzcrbarmc != null and cpmctymc != '' and cpmctymc != null"> <if test="ylqxzcrbarmc != '' and ylqxzcrbarmc != null and cpmctymc != '' and cpmctymc != null">
AND cpmctymc LIKE concat('%',#{cpmctymc},'%') AND cpmctymc LIKE concat('%', #{cpmctymc}, '%')
</if> </if>
<if test="nameCode != '' and nameCode != null"> <if test="nameCode != '' and nameCode != null">
AND nameCode LIKE concat(#{nameCode},'%') AND nameCode LIKE concat(#{nameCode}, '%')
</if> </if>
<if test="uuid != '' and uuid != null"> <if test="uuid != '' and uuid != null">
AND uuid = #{uuid} AND uuid = #{uuid}
</if> </if>
<if test="ggxh != '' and ggxh != null"> <if test="ggxh != '' and ggxh != null">
AND ggxh LIKE concat('%',#{ggxh},'%') AND ggxh LIKE concat('%', #{ggxh}, '%')
</if> </if>
<if test="zczbhhzbapzbh != '' and zczbhhzbapzbh != null"> <if test="zczbhhzbapzbh != '' and zczbhhzbapzbh != null">
AND zczbhhzbapzbh LIKE concat('%',#{zczbhhzbapzbh},'%') AND zczbhhzbapzbh LIKE concat('%', #{zczbhhzbapzbh}, '%')
</if> </if>
<if test="deviceRecordKey != '' and deviceRecordKey != null"> <if test="deviceRecordKey != '' and deviceRecordKey != null">
AND deviceRecordKey = #{deviceRecordKey} AND deviceRecordKey = #{deviceRecordKey}
</if> </if>
<if test="updateTime!=null and updateTime!=''"> <if test="updateTime != null and updateTime != ''">
<![CDATA[ and updateTime>= DATE_FORMAT(#{updateTime}, '%Y-%m-%d %H:%i:%S') ]]> <![CDATA[
and updateTime >= DATE_FORMAT(#{updateTime}, '%Y-%m-%d %H:%i:%S')
]]>
</if> </if>
<if test="isNewest != null and isNewest!=''"> <if test="isNewest != null and isNewest != ''">
AND isNewest = #{isNewest} AND isNewest = #{isNewest}
</if> </if>
<if test="diType != '' and diType != null"> <if test="diType != '' and diType != null">
AND diType = #{diType} AND diType = #{diType}
</if> </if>
</where> </where>
</select> </select>
@ -368,24 +378,23 @@
<select id="syncDlUdi" parameterType="com.glxp.api.req.basic.ProductInfoFilterRequest" <select id="syncDlUdi" parameterType="com.glxp.api.req.basic.ProductInfoFilterRequest"
resultType="com.glxp.api.entity.basic.ProductInfoEntity"> resultType="com.glxp.api.entity.basic.ProductInfoEntity">
SELECT *
SELECT * FROM productinfo FROM productinfo
<where> <where>
<if test="ylqxzcrbarmc != '' and ylqxzcrbarmc != null"> <if test="ylqxzcrbarmc != '' and ylqxzcrbarmc != null">
AND ylqxzcrbarmc LIKE concat(#{ylqxzcrbarmc},'%') AND ylqxzcrbarmc LIKE concat(#{ylqxzcrbarmc}, '%')
</if> </if>
<if test="cpmctymc != '' and cpmctymc != null"> <if test="cpmctymc != '' and cpmctymc != null">
AND cpmctymc LIKE concat(#{cpmctymc},'%') AND cpmctymc LIKE concat(#{cpmctymc}, '%')
</if> </if>
<if test="nameCode != '' and nameCode != null"> <if test="nameCode != '' and nameCode != null">
AND nameCode LIKE concat(#{nameCode},'%') AND nameCode LIKE concat(#{nameCode}, '%')
</if> </if>
<if test="uuid != '' and uuid != null"> <if test="uuid != '' and uuid != null">
AND uuid = #{uuid} AND uuid = #{uuid}
</if> </if>
<if test="ggxh != '' and ggxh != null"> <if test="ggxh != '' and ggxh != null">
AND ggxh LIKE concat('%',#{ggxh},'%') AND ggxh LIKE concat('%', #{ggxh}, '%')
</if> </if>
<if test="zczbhhzbapzbh != '' and zczbhhzbapzbh != null"> <if test="zczbhhzbapzbh != '' and zczbhhzbapzbh != null">
AND zczbhhzbapzbh = #{zczbhhzbapzbh} AND zczbhhzbapzbh = #{zczbhhzbapzbh}
@ -393,8 +402,10 @@
<if test="deviceRecordKey != '' and deviceRecordKey != null"> <if test="deviceRecordKey != '' and deviceRecordKey != null">
AND deviceRecordKey = #{deviceRecordKey} AND deviceRecordKey = #{deviceRecordKey}
</if> </if>
<if test="updateTime!=null and updateTime!=''"> <if test="updateTime != null and updateTime != ''">
<![CDATA[ and updateTime>= DATE_FORMAT(#{updateTime}, '%Y-%m-%d %H:%i:%S') ]]> <![CDATA[
and updateTime >= DATE_FORMAT(#{updateTime}, '%Y-%m-%d %H:%i:%S')
]]>
</if> </if>
</where> </where>
limit #{page},#{limit} limit #{page},#{limit}
@ -404,126 +415,122 @@
<insert id="insertProductInfo" keyProperty="id" <insert id="insertProductInfo" keyProperty="id"
parameterType="com.glxp.api.entity.basic.ProductInfoEntity"> parameterType="com.glxp.api.entity.basic.ProductInfoEntity">
REPLACE REPLACE
INTO productinfo INTO productinfo
( (id, nameCode, packRatio, packLevel, bhxjsl,
id,nameCode,packRatio,packLevel,bhxjsl, bhzxxsbzsl, zxxsbzbhsydysl, bhxjcpbm, bzcj, thirdProductNo, addType, deviceRecordKey, isUseDy,
bhzxxsbzsl,zxxsbzbhsydysl,bhxjcpbm,bzcj,thirdProductNo,addType,deviceRecordKey,isUseDy,thirdProductName, thirdProductName,
cpmctymc,cplb,flbm,ggxh,qxlb,tyshxydm,ylqxzcrbarmc,zczbhhzbapzbh,ylqxzcrbarywmc,uuid,sjcpbm,versionNumber cpmctymc, cplb, flbm, ggxh, qxlb, tyshxydm, ylqxzcrbarmc, zczbhhzbapzbh, ylqxzcrbarywmc, uuid, sjcpbm,
,diType,scbssfbhph,scbssfbhxlh,scbssfbhscrq,scbssfbhsxrq, versionNumber
ybbm,spmc,cphhhbh,cpms,cpbsbmtxmc,isNewest,updateTime,cplx,hchzsb , diType, scbssfbhph, scbssfbhxlh, scbssfbhscrq, scbssfbhsxrq,
,sfwblztlcp,cgzmraqxgxx,sfbjwycxsy,zdcfsycs,sfwwjbz,syqsfxyjxmj,qtxxdwzlj,mjfs ybbm, spmc, cphhhbh, cpms, cpbsbmtxmc, isNewest, updateTime, cplx, hchzsb
) , sfwblztlcp, cgzmraqxgxx, sfbjwycxsy, zdcfsycs, sfwwjbz, syqsfxyjxmj, qtxxdwzlj, mjfs,
values categoryName)
( values (#{id},
#{id}, #{nameCode},
#{nameCode}, #{packRatio},
#{packRatio}, #{packLevel},
#{packLevel}, #{bhxjsl},
#{bhxjsl}, #{bhzxxsbzsl},
#{bhzxxsbzsl}, #{zxxsbzbhsydysl},
#{zxxsbzbhsydysl}, #{bhxjcpbm},
#{bhxjcpbm}, #{bzcj},
#{bzcj}, #{thirdProductNo},
#{thirdProductNo}, #{addType},
#{addType}, #{deviceRecordKey},
#{deviceRecordKey}, #{isUseDy},
#{isUseDy}, #{thirdProductName},
#{thirdProductName}, #{cpmctymc},
#{cpmctymc}, #{cplb},
#{cplb}, #{flbm},
#{flbm}, #{ggxh},
#{ggxh}, #{qxlb},
#{qxlb}, #{tyshxydm},
#{tyshxydm}, #{ylqxzcrbarmc},
#{ylqxzcrbarmc}, #{zczbhhzbapzbh},
#{zczbhhzbapzbh}, #{ylqxzcrbarywmc},
#{ylqxzcrbarywmc}, #{uuid},
#{uuid}, #{sjcpbm},
#{sjcpbm}, #{versionNumber},
#{versionNumber}, #{diType},
#{diType}, #{scbssfbhph},
#{scbssfbhph}, #{scbssfbhxlh},
#{scbssfbhxlh}, #{scbssfbhscrq},
#{scbssfbhscrq}, #{scbssfbhsxrq},
#{scbssfbhsxrq}, #{ybbm},
#{ybbm}, #{spmc},
#{spmc}, #{cphhhbh},
#{cphhhbh}, #{cpms},
#{cpms}, #{cpbsbmtxmc},
#{cpbsbmtxmc}, #{isNewest},
#{isNewest}, #{updateTime},
#{updateTime}, #{cplx},
#{cplx}, #{hchzsb},
#{hchzsb}, #{sfwblztlcp},
#{sfwblztlcp}, #{cgzmraqxgxx},
#{cgzmraqxgxx}, #{sfbjwycxsy},
#{sfbjwycxsy}, #{zdcfsycs},
#{zdcfsycs}, #{sfwwjbz},
#{sfwwjbz}, #{syqsfxyjxmj},
#{syqsfxyjxmj}, #{qtxxdwzlj},
#{qtxxdwzlj}, #{mjfs}, #{categoryName})
#{mjfs}
)
</insert> </insert>
<insert id="insertProductInfos" keyProperty="id" <insert id="insertProductInfos" keyProperty="id"
parameterType="com.glxp.api.entity.basic.ProductInfoEntity"> parameterType="com.glxp.api.entity.basic.ProductInfoEntity">
REPLACE INTO productinfo REPLACE INTO productinfo
( (id, nameCode, packRatio, packLevel, bhxjsl,
id,nameCode,packRatio,packLevel,bhxjsl, bhzxxsbzsl, zxxsbzbhsydysl, bhxjcpbm, bzcj, thirdProductNo, addType, deviceRecordKey, isUseDy,
bhzxxsbzsl,zxxsbzbhsydysl,bhxjcpbm,bzcj,thirdProductNo,addType,deviceRecordKey,isUseDy,thirdProductName, thirdProductName,
cpmctymc,cplb,flbm,ggxh,qxlb,tyshxydm,ylqxzcrbarmc,zczbhhzbapzbh,ylqxzcrbarywmc,uuid,sjcpbm,versionNumber cpmctymc, cplb, flbm, ggxh, qxlb, tyshxydm, ylqxzcrbarmc, zczbhhzbapzbh, ylqxzcrbarywmc, uuid, sjcpbm,
,diType,scbssfbhph,scbssfbhxlh,scbssfbhscrq,scbssfbhsxrq, versionNumber
ybbm,spmc,cphhhbh,cpms,cpbsbmtxmc,isNewest,updateTime,cplx,hchzsb , diType, scbssfbhph, scbssfbhxlh, scbssfbhscrq, scbssfbhsxrq,
,sfwblztlcp,cgzmraqxgxx,sfbjwycxsy,zdcfsycs,sfwwjbz,syqsfxyjxmj,qtxxdwzlj,mjfs ybbm, spmc, cphhhbh, cpms, cpbsbmtxmc, isNewest, updateTime, cplx, hchzsb
) values , sfwblztlcp, cgzmraqxgxx, sfbjwycxsy, zdcfsycs, sfwwjbz, syqsfxyjxmj, qtxxdwzlj, mjfs,
categoryName) values
<foreach collection="datas" item="item" index="index" <foreach collection="datas" item="item" index="index"
separator=","> separator=",">
(#{item.id},
#{item.nameCode},
( #{item.packRatio},
#{item.id}, #{item.packLevel},
#{item.nameCode}, #{item.bhxjsl},
#{item.packRatio}, #{item.bhzxxsbzsl},
#{item.packLevel}, #{item.zxxsbzbhsydysl},
#{item.bhxjsl}, #{item.bhxjcpbm},
#{item.bhzxxsbzsl}, #{item.bzcj},
#{item.zxxsbzbhsydysl}, #{item.thirdProductNo},
#{item.bhxjcpbm}, #{item.addType},
#{item.bzcj}, #{item.deviceRecordKey},
#{item.thirdProductNo}, #{item.isUseDy},
#{item.addType}, #{item.thirdProductName},
#{item.deviceRecordKey}, #{item.cpmctymc},
#{item.isUseDy}, #{item.cplb},
#{item.thirdProductName}, #{item.flbm},
#{item.cpmctymc}, #{item.ggxh},
#{item.cplb}, #{item.qxlb},
#{item.flbm}, #{item.tyshxydm},
#{item.ggxh}, #{item.ylqxzcrbarmc},
#{item.qxlb}, #{item.zczbhhzbapzbh},
#{item.tyshxydm}, #{item.ylqxzcrbarywmc},
#{item.ylqxzcrbarmc}, #{item.uuid},
#{item.zczbhhzbapzbh}, #{item.sjcpbm},
#{item.ylqxzcrbarywmc}, #{item.versionNumber},
#{item.uuid}, #{item.diType},
#{item.sjcpbm}, #{item.scbssfbhph},
#{item.versionNumber}, #{item.scbssfbhxlh},
#{item.diType}, #{item.scbssfbhscrq},
#{item.scbssfbhph}, #{item.scbssfbhsxrq},
#{item.scbssfbhxlh}, #{item.ybbm},
#{item.scbssfbhscrq}, #{item.spmc},
#{item.scbssfbhsxrq}, #{item.cphhhbh},
#{item.ybbm}, #{item.cpms},
#{item.spmc}, #{item.cpbsbmtxmc},
#{item.cphhhbh}, #{item.isNewest},
#{item.cpms}, #{item.updateTime}, #{item.cplx}, #{item.hchzsb}, #{item.sfwblztlcp}, #{item.cgzmraqxgxx},
#{item.cpbsbmtxmc}, #{item.sfbjwycxsy}, #{item.zdcfsycs}
#{item.isNewest}, , #{item.sfwwjbz}, #{item.syqsfxyjxmj}, #{item.qtxxdwzlj}, #{item.mjfs}, #{item.categoryName})
#{item.updateTime},#{item.cplx},#{item.hchzsb},#{item.sfwblztlcp},#{item.cgzmraqxgxx},#{item.sfbjwycxsy},#{item.zdcfsycs}
,#{item.sfwwjbz},#{item.syqsfxyjxmj},#{item.qtxxdwzlj},#{item.mjfs}
)
</foreach> </foreach>
</insert> </insert>
@ -534,7 +541,8 @@
</delete> </delete>
<delete id="deleteAll" parameterType="java.util.List"> <delete id="deleteAll" parameterType="java.util.List">
DELETE FROM productinfo WHERE thirdProductNo in DELETE
FROM productinfo WHERE thirdProductNo in
<foreach collection="ids" item="item" open="(" separator="," close=")"> <foreach collection="ids" item="item" open="(" separator="," close=")">
#{item} #{item}
</foreach> </foreach>
@ -543,44 +551,120 @@
<update id="updateProductInfo" parameterType="com.glxp.api.entity.basic.ProductInfoEntity"> <update id="updateProductInfo" parameterType="com.glxp.api.entity.basic.ProductInfoEntity">
UPDATE productinfo UPDATE productinfo
<set> <set>
<if test="nameCode != null">nameCode=#{nameCode},</if> <if test="nameCode != null">
<if test="packRatio != null">packRatio=#{packRatio},</if> nameCode=#{nameCode},
<if test="packLevel != null">packLevel=#{packLevel},</if> </if>
<if test="bhxjsl != null">bhxjsl=#{bhxjsl},</if> <if test="packRatio != null">
<if test="bhzxxsbzsl != null">bhzxxsbzsl=#{bhzxxsbzsl},</if> packRatio=#{packRatio},
<if test="zxxsbzbhsydysl != null">zxxsbzbhsydysl=#{zxxsbzbhsydysl},</if> </if>
<if test="bhxjcpbm != null">bhxjcpbm=#{bhxjcpbm},</if> <if test="packLevel != null">
<if test="bzcj != null">bzcj=#{bzcj},</if> packLevel=#{packLevel},
<if test="thirdProductNo != null">thirdProductNo=#{thirdProductNo},</if> </if>
<if test="addType != null">addType=#{addType},</if> <if test="bhxjsl != null">
<if test="deviceRecordKey != null">deviceRecordKey=#{deviceRecordKey},</if> bhxjsl=#{bhxjsl},
<if test="isUseDy != null">isUseDy=#{isUseDy},</if> </if>
<if test="thirdProductName != null">thirdProductName=#{thirdProductName},</if> <if test="bhzxxsbzsl != null">
<if test="cpmctymc != null">cpmctymc=#{cpmctymc},</if> bhzxxsbzsl=#{bhzxxsbzsl},
<if test="cplb != null">cplb=#{cplb},</if> </if>
<if test="flbm != null">flbm=#{flbm},</if> <if test="zxxsbzbhsydysl != null">
<if test="ggxh != null">ggxh=#{ggxh},</if> zxxsbzbhsydysl=#{zxxsbzbhsydysl},
<if test="qxlb != null">qxlb=#{qxlb},</if> </if>
<if test="tyshxydm != null">tyshxydm=#{tyshxydm},</if> <if test="bhxjcpbm != null">
<if test="ylqxzcrbarmc != null">ylqxzcrbarmc=#{ylqxzcrbarmc},</if> bhxjcpbm=#{bhxjcpbm},
<if test="ylqxzcrbarywmc != null">ylqxzcrbarywmc=#{ylqxzcrbarywmc},</if> </if>
<if test="uuid != null">uuid=#{uuid},</if> <if test="bzcj != null">
<if test="sjcpbm != null">sjcpbm=#{sjcpbm},</if> bzcj=#{bzcj},
<if test="versionNumber != null">versionNumber=#{versionNumber},</if> </if>
<if test="diType != null">diType=#{diType},</if> <if test="thirdProductNo != null">
<if test="isNewest != null">isNewest=#{isNewest},</if> thirdProductNo=#{thirdProductNo},
<if test="updateTime != null">updateTime=#{updateTime},</if> </if>
<if test="cplx != null">cplx=#{cplx},</if> <if test="addType != null">
<if test="hchzsb != null">hchzsb=#{hchzsb},</if> addType=#{addType},
<if test="sfwblztlcp != null">sfwblztlcp=#{sfwblztlcp},</if> </if>
<if test="cgzmraqxgxx != null">cgzmraqxgxx=#{cgzmraqxgxx},</if> <if test="deviceRecordKey != null">
<if test="sfbjwycxsy != null">sfbjwycxsy=#{sfbjwycxsy},</if> deviceRecordKey=#{deviceRecordKey},
<if test="zdcfsycs != null">zdcfsycs=#{zdcfsycs},</if> </if>
<if test="sfwwjbz != null">sfwwjbz=#{sfwwjbz},</if> <if test="isUseDy != null">
<if test="syqsfxyjxmj != null">syqsfxyjxmj=#{syqsfxyjxmj}, isUseDy=#{isUseDy},
</if> </if>
<if test="qtxxdwzlj != null">qtxxdwzlj=#{qtxxdwzlj},</if> <if test="thirdProductName != null">
<if test="mjfs != null">mjfs=#{mjfs},</if> thirdProductName=#{thirdProductName},
</if>
<if test="cpmctymc != null">
cpmctymc=#{cpmctymc},
</if>
<if test="cplb != null">
cplb=#{cplb},
</if>
<if test="flbm != null">
flbm=#{flbm},
</if>
<if test="ggxh != null">
ggxh=#{ggxh},
</if>
<if test="qxlb != null">
qxlb=#{qxlb},
</if>
<if test="tyshxydm != null">
tyshxydm=#{tyshxydm},
</if>
<if test="ylqxzcrbarmc != null">
ylqxzcrbarmc=#{ylqxzcrbarmc},
</if>
<if test="ylqxzcrbarywmc != null">
ylqxzcrbarywmc=#{ylqxzcrbarywmc},
</if>
<if test="uuid != null">
uuid=#{uuid},
</if>
<if test="sjcpbm != null">
sjcpbm=#{sjcpbm},
</if>
<if test="versionNumber != null">
versionNumber=#{versionNumber},
</if>
<if test="diType != null">
diType=#{diType},
</if>
<if test="isNewest != null">
isNewest=#{isNewest},
</if>
<if test="updateTime != null">
updateTime=#{updateTime},
</if>
<if test="cplx != null">
cplx=#{cplx},
</if>
<if test="hchzsb != null">
hchzsb=#{hchzsb},
</if>
<if test="sfwblztlcp != null">
sfwblztlcp=#{sfwblztlcp},
</if>
<if test="cgzmraqxgxx != null">
cgzmraqxgxx=#{cgzmraqxgxx},
</if>
<if test="sfbjwycxsy != null">
sfbjwycxsy=#{sfbjwycxsy},
</if>
<if test="zdcfsycs != null">
zdcfsycs=#{zdcfsycs},
</if>
<if test="sfwwjbz != null">
sfwwjbz=#{sfwwjbz},
</if>
<if test="syqsfxyjxmj != null">
syqsfxyjxmj=#{syqsfxyjxmj},
</if>
<if test="qtxxdwzlj != null">
qtxxdwzlj=#{qtxxdwzlj},
</if>
<if test="mjfs != null">
mjfs=#{mjfs},
</if>
<if test="categoryName != null">
categoryName=#{categoryName},
</if>
</set> </set>
WHERE id = #{id} WHERE id = #{id}
</update> </update>
@ -588,29 +672,72 @@
<update id="updateProductByUuid" parameterType="com.glxp.api.entity.basic.ProductInfoEntity"> <update id="updateProductByUuid" parameterType="com.glxp.api.entity.basic.ProductInfoEntity">
UPDATE productinfo UPDATE productinfo
<set> <set>
<if test="scbssfbhph != null">scbssfbhph=#{scbssfbhph},</if> <if test="scbssfbhph != null">
<if test="scbssfbhxlh != null">scbssfbhxlh=#{scbssfbhxlh},</if> scbssfbhph=#{scbssfbhph},
<if test="scbssfbhscrq != null">scbssfbhscrq=#{scbssfbhscrq},</if> </if>
<if test="scbssfbhsxrq != null">scbssfbhsxrq=#{scbssfbhsxrq},</if> <if test="scbssfbhxlh != null">
<if test="ybbm != null">ybbm=#{ybbm},</if> scbssfbhxlh=#{scbssfbhxlh},
<if test="spmc != null">spmc=#{spmc},</if> </if>
<if test="cphhhbh != null">cphhhbh=#{cphhhbh},</if> <if test="scbssfbhscrq != null">
<if test="cpms != null">cpms=#{cpms},</if> scbssfbhscrq=#{scbssfbhscrq},
<if test="cpbsbmtxmc != null">cpbsbmtxmc=#{cpbsbmtxmc},</if> </if>
<if test="isNewest != null">isNewest=#{isNewest},</if> <if test="scbssfbhsxrq != null">
<if test="updateTime != null">updateTime=#{updateTime},</if> scbssfbhsxrq=#{scbssfbhsxrq},
<if test="cplx != null">cplx=#{cplx},</if> </if>
<if test="hchzsb != null">hchzsb=#{hchzsb}, <if test="ybbm != null">
</if> ybbm=#{ybbm},
<if test="sfwblztlcp != null">sfwblztlcp=#{sfwblztlcp},</if> </if>
<if test="cgzmraqxgxx != null">cgzmraqxgxx=#{cgzmraqxgxx},</if> <if test="spmc != null">
<if test="sfbjwycxsy != null">sfbjwycxsy=#{sfbjwycxsy},</if> spmc=#{spmc},
<if test="zdcfsycs != null">zdcfsycs=#{zdcfsycs},</if> </if>
<if test="sfwwjbz != null">sfwwjbz=#{sfwwjbz},</if> <if test="cphhhbh != null">
<if test="syqsfxyjxmj != null">syqsfxyjxmj=#{syqsfxyjxmj}, cphhhbh=#{cphhhbh},
</if> </if>
<if test="qtxxdwzlj != null">qtxxdwzlj=#{qtxxdwzlj},</if> <if test="cpms != null">
<if test="mjfs != null">mjfs=#{mjfs},</if> cpms=#{cpms},
</if>
<if test="cpbsbmtxmc != null">
cpbsbmtxmc=#{cpbsbmtxmc},
</if>
<if test="isNewest != null">
isNewest=#{isNewest},
</if>
<if test="updateTime != null">
updateTime=#{updateTime},
</if>
<if test="cplx != null">
cplx=#{cplx},
</if>
<if test="hchzsb != null">
hchzsb=#{hchzsb},
</if>
<if test="sfwblztlcp != null">
sfwblztlcp=#{sfwblztlcp},
</if>
<if test="cgzmraqxgxx != null">
cgzmraqxgxx=#{cgzmraqxgxx},
</if>
<if test="sfbjwycxsy != null">
sfbjwycxsy=#{sfbjwycxsy},
</if>
<if test="zdcfsycs != null">
zdcfsycs=#{zdcfsycs},
</if>
<if test="sfwwjbz != null">
sfwwjbz=#{sfwwjbz},
</if>
<if test="syqsfxyjxmj != null">
syqsfxyjxmj=#{syqsfxyjxmj},
</if>
<if test="qtxxdwzlj != null">
qtxxdwzlj=#{qtxxdwzlj},
</if>
<if test="mjfs != null">
mjfs=#{mjfs},
</if>
<if test="categoryName != null">
categoryName=#{categoryName},
</if>
</set> </set>
WHERE uuid = #{uuid} WHERE uuid = #{uuid}
</update> </update>
@ -620,7 +747,8 @@
<select id="findAllUuids" parameterType="com.glxp.api.util.page.ListPageRequest" resultType="java.lang.String"> <select id="findAllUuids" parameterType="com.glxp.api.util.page.ListPageRequest" resultType="java.lang.String">
SELECT uuid SELECT uuid
from device from device
group by uuid limit #{page}, #{limit} group by uuid
limit #{page}, #{limit}
</select> </select>
<select id="findAllTyshxyh" resultType="java.lang.String"> <select id="findAllTyshxyh" resultType="java.lang.String">
SELECT tyshxydm SELECT tyshxydm

@ -84,7 +84,14 @@
basic_products.allowNoProduct, basic_products.allowNoProduct,
basic_products.allowNoSerial, basic_products.allowNoSerial,
basic_products.spmc, basic_products.spmc,
basic_products.cplx, basic_products.sfwblztlcp,
basic_products.cgzmraqxgxx,
basic_products.sfbjwycxsy,
basic_products.zdcfsycs,
basic_products.sfwwjbz,
basic_products.syqsfxyjxmj,
basic_products.mjfs,
basic_products.categoryName,
basic_products.hchzsb basic_products.hchzsb
FROM (company_product_relevance FROM (company_product_relevance
inner JOIN basic_udirel inner JOIN basic_udirel
@ -155,6 +162,14 @@
WHERE (uuid = #{uuid}) WHERE (uuid = #{uuid})
</select> </select>
<select id="findByOriginUuid" parameterType="java.lang.String"
resultType="com.glxp.api.entity.basic.UdiProductEntity">
SELECT *
FROM basic_products
WHERE (originUuid = #{originUuid})
</select>
<select id="findByNameCode" parameterType="java.lang.String" <select id="findByNameCode" parameterType="java.lang.String"
resultType="com.glxp.api.entity.basic.UdiProductEntity"> resultType="com.glxp.api.entity.basic.UdiProductEntity">
SELECT * SELECT *
@ -172,7 +187,8 @@
allowNoBatch, allowNoExpire, allowNoBatch, allowNoExpire,
allowNoProduct, allowNoSerial, spmc, cplx, hchzsb, cpdls, price, basicPrductRemak1, basicPrductRemak2, allowNoProduct, allowNoSerial, spmc, cplx, hchzsb, cpdls, price, basicPrductRemak1, basicPrductRemak2,
basicPrductRemak3, basicPrductRemak4, basicPrductRemak5, basicPrductRemak6, basicPrductRemak7, basicPrductRemak3, basicPrductRemak4, basicPrductRemak5, basicPrductRemak6, basicPrductRemak7,
basicPrductRemak8, updateTime) basicPrductRemak8, updateTime
, sfwblztlcp, cgzmraqxgxx, sfbjwycxsy, zdcfsycs, sfwwjbz, syqsfxyjxmj, mjfs, categoryName)
values (#{id}, #{uuid}, values (#{id}, #{uuid},
#{originUuid}, #{originUuid},
#{nameCode}, #{nameCode},
@ -223,7 +239,9 @@
#{basicPrductRemak5}, #{basicPrductRemak5},
#{basicPrductRemak6}, #{basicPrductRemak6},
#{basicPrductRemak7}, #{basicPrductRemak7},
#{basicPrductRemak8}, #{updateTime}) #{basicPrductRemak8}, #{updateTime}
, #{sfwblztlcp}, #{cgzmraqxgxx}, #{sfbjwycxsy}, #{zdcfsycs}, #{sfwwjbz}, #{syqsfxyjxmj}, #{mjfs},
#{categoryName})
</insert> </insert>
<insert id="insertUdiInfos" parameterType="java.util.List"> <insert id="insertUdiInfos" parameterType="java.util.List">
@ -235,7 +253,8 @@
allowNoBatch, allowNoExpire, allowNoBatch, allowNoExpire,
allowNoProduct, allowNoSerial, spmc, cplx, hchzsb, cpdls, price, basicPrductRemak1, basicPrductRemak2, allowNoProduct, allowNoSerial, spmc, cplx, hchzsb, cpdls, price, basicPrductRemak1, basicPrductRemak2,
basicPrductRemak3, basicPrductRemak4, basicPrductRemak5, basicPrductRemak6, basicPrductRemak7, basicPrductRemak3, basicPrductRemak4, basicPrductRemak5, basicPrductRemak6, basicPrductRemak7,
basicPrductRemak8, updateTime) basicPrductRemak8, updateTime, sfwblztlcp, cgzmraqxgxx, sfbjwycxsy, zdcfsycs, sfwwjbz, syqsfxyjxmj,
mjfs, categoryName)
values values
<foreach collection="udiInfoEntities" item="item" index="index" <foreach collection="udiInfoEntities" item="item" index="index"
@ -291,7 +310,10 @@
#{item.basicPrductRemak5}, #{item.basicPrductRemak5},
#{item.basicPrductRemak6}, #{item.basicPrductRemak6},
#{item.basicPrductRemak7}, #{item.basicPrductRemak7},
#{item.basicPrductRemak8}, #{item.updateTime}) #{item.basicPrductRemak8}, #{item.updateTime}, #{item.sfwblztlcp}, #{item.cgzmraqxgxx}, #{item.sfbjwycxsy},
#{item.zdcfsycs},
#{item.sfwwjbz}, #{item.syqsfxyjxmj}, #{item.mjfs},
#{item.categoryName})
</foreach> </foreach>
</insert> </insert>
@ -466,6 +488,31 @@
<if test="basicPrductRemak8 != null"> <if test="basicPrductRemak8 != null">
basicPrductRemak8=#{basicPrductRemak8}, basicPrductRemak8=#{basicPrductRemak8},
</if> </if>
<if test="sfwblztlcp != null">
sfwblztlcp=#{sfwblztlcp},
</if>
<if test="cgzmraqxgxx != null">
cgzmraqxgxx=#{cgzmraqxgxx},
</if>
<if test="sfbjwycxsy != null">
sfbjwycxsy=#{sfbjwycxsy},
</if>
<if test="zdcfsycs != null">
zdcfsycs=#{zdcfsycs},
</if>
<if test="sfwwjbz != null">
sfwwjbz=#{sfwwjbz},
</if>
<if test="syqsfxyjxmj != null">
syqsfxyjxmj=#{syqsfxyjxmj},
</if>
<if test="mjfs != null">
mjfs=#{mjfs},
</if>
<if test="categoryName != null">
categoryName=#{categoryName},
</if>
</trim> </trim>
WHERE nameCode = #{nameCode} WHERE nameCode = #{nameCode}
and uuid = #{uuid} and uuid = #{uuid}
@ -630,6 +677,31 @@
<if test="updateTime != null"> <if test="updateTime != null">
updateTime=#{updateTime}, updateTime=#{updateTime},
</if> </if>
<if test="sfwblztlcp != null">
sfwblztlcp=#{sfwblztlcp},
</if>
<if test="cgzmraqxgxx != null">
cgzmraqxgxx=#{cgzmraqxgxx},
</if>
<if test="sfbjwycxsy != null">
sfbjwycxsy=#{sfbjwycxsy},
</if>
<if test="zdcfsycs != null">
zdcfsycs=#{zdcfsycs},
</if>
<if test="sfwwjbz != null">
sfwwjbz=#{sfwwjbz},
</if>
<if test="syqsfxyjxmj != null">
syqsfxyjxmj=#{syqsfxyjxmj},
</if>
<if test="mjfs != null">
mjfs=#{mjfs},
</if>
<if test="categoryName != null">
categoryName=#{categoryName},
</if>
</trim> </trim>
where uuid = #{uuid} where uuid = #{uuid}
</update> </update>
@ -793,6 +865,32 @@
<if test="updateTime != null"> <if test="updateTime != null">
updateTime=#{updateTime}, updateTime=#{updateTime},
</if> </if>
<if test="sfwblztlcp != null">
sfwblztlcp=#{sfwblztlcp},
</if>
<if test="cgzmraqxgxx != null">
cgzmraqxgxx=#{cgzmraqxgxx},
</if>
<if test="sfbjwycxsy != null">
sfbjwycxsy=#{sfbjwycxsy},
</if>
<if test="zdcfsycs != null">
zdcfsycs=#{zdcfsycs},
</if>
<if test="sfwwjbz != null">
sfwwjbz=#{sfwwjbz},
</if>
<if test="syqsfxyjxmj != null">
syqsfxyjxmj=#{syqsfxyjxmj},
</if>
<if test="mjfs != null">
mjfs=#{mjfs},
</if>
<if test="categoryName != null">
categoryName=#{categoryName},
</if>
</trim> </trim>
where id = #{id} where id = #{id}
</update> </update>
@ -958,6 +1056,32 @@
<if test="basicPrductRemak8 != null"> <if test="basicPrductRemak8 != null">
basicPrductRemak8=#{basicPrductRemak8}, basicPrductRemak8=#{basicPrductRemak8},
</if> </if>
<if test="sfwblztlcp != null">
sfwblztlcp=#{sfwblztlcp},
</if>
<if test="cgzmraqxgxx != null">
cgzmraqxgxx=#{cgzmraqxgxx},
</if>
<if test="sfbjwycxsy != null">
sfbjwycxsy=#{sfbjwycxsy},
</if>
<if test="zdcfsycs != null">
zdcfsycs=#{zdcfsycs},
</if>
<if test="sfwwjbz != null">
sfwwjbz=#{sfwwjbz},
</if>
<if test="syqsfxyjxmj != null">
syqsfxyjxmj=#{syqsfxyjxmj},
</if>
<if test="mjfs != null">
mjfs=#{mjfs},
</if>
<if test="categoryName != null">
categoryName=#{categoryName},
</if>
</trim> </trim>
WHERE uuid = #{uuid} WHERE uuid = #{uuid}
</update> </update>

@ -57,7 +57,15 @@
basic_products.basicPrductRemak5, basic_products.basicPrductRemak5,
basic_products.basicPrductRemak6, basic_products.basicPrductRemak6,
basic_products.basicPrductRemak7, basic_products.basicPrductRemak7,
basic_products.basicPrductRemak8 basic_products.basicPrductRemak8,
basic_products.sfwblztlcp,
basic_products.cgzmraqxgxx,
basic_products.sfbjwycxsy,
basic_products.zdcfsycs,
basic_products.sfwwjbz,
basic_products.syqsfxyjxmj,
basic_products.mjfs,
basic_products.categoryName
FROM basic_udirel FROM basic_udirel
inner JOIN basic_products inner JOIN basic_products
ON basic_products.uuid = basic_udirel.uuid ON basic_products.uuid = basic_udirel.uuid
@ -177,6 +185,14 @@
basic_products.basicPrductRemak6, basic_products.basicPrductRemak6,
basic_products.basicPrductRemak7, basic_products.basicPrductRemak7,
basic_products.basicPrductRemak8, basic_products.basicPrductRemak8,
basic_products.sfwblztlcp,
basic_products.cgzmraqxgxx,
basic_products.sfbjwycxsy,
basic_products.zdcfsycs,
basic_products.sfwwjbz,
basic_products.syqsfxyjxmj,
basic_products.mjfs,
basic_products.categoryName,
company_product_relevance.unitFk, company_product_relevance.unitFk,
basic_corp.name companyName basic_corp.name companyName
FROM basic_udirel FROM basic_udirel
@ -305,8 +321,16 @@
basic_products.basicPrductRemak5, basic_products.basicPrductRemak5,
basic_products.basicPrductRemak6, basic_products.basicPrductRemak6,
basic_products.basicPrductRemak7, basic_products.basicPrductRemak7,
basic_products.sfwblztlcp,
basic_products.cgzmraqxgxx,
basic_products.sfbjwycxsy,
basic_products.zdcfsycs,
basic_products.sfwwjbz,
basic_products.syqsfxyjxmj,
basic_products.mjfs,
basic_products.categoryName,
basic_products.groupBuy, basic_products.groupBuy,
basic_products.basicPrductRemak8 basic_products.basicPrductRemak8
FROM basic_products FROM basic_products
inner JOIN basic_udirel inner JOIN basic_udirel
ON basic_products.uuid = basic_udirel.uuid ON basic_products.uuid = basic_udirel.uuid
@ -481,7 +505,15 @@
basic_products.basicPrductRemak5, basic_products.basicPrductRemak5,
basic_products.basicPrductRemak6, basic_products.basicPrductRemak6,
basic_products.basicPrductRemak7, basic_products.basicPrductRemak7,
basic_products.basicPrductRemak8 basic_products.basicPrductRemak8,
basic_products.sfwblztlcp,
basic_products.cgzmraqxgxx,
basic_products.sfbjwycxsy,
basic_products.zdcfsycs,
basic_products.sfwwjbz,
basic_products.syqsfxyjxmj,
basic_products.mjfs,
basic_products.categoryName
FROM basic_products FROM basic_products
inner JOIN basic_udirel inner JOIN basic_udirel
ON basic_products.uuid = basic_udirel.uuid ON basic_products.uuid = basic_udirel.uuid
@ -648,7 +680,15 @@
basic_products.basicPrductRemak5, basic_products.basicPrductRemak5,
basic_products.basicPrductRemak6, basic_products.basicPrductRemak6,
basic_products.basicPrductRemak7, basic_products.basicPrductRemak7,
basic_products.basicPrductRemak8 basic_products.basicPrductRemak8,
basic_products.sfwblztlcp,
basic_products.cgzmraqxgxx,
basic_products.sfbjwycxsy,
basic_products.zdcfsycs,
basic_products.sfwwjbz,
basic_products.syqsfxyjxmj,
basic_products.mjfs,
basic_products.categoryName
from basic_udirel from basic_udirel
INNER JOIN basic_products on basic_udirel.uuid = basic_products.uuid INNER JOIN basic_products on basic_udirel.uuid = basic_products.uuid
<where> <where>
@ -1068,7 +1108,15 @@
basic_products.basicPrductRemak5, basic_products.basicPrductRemak5,
basic_products.basicPrductRemak6, basic_products.basicPrductRemak6,
basic_products.basicPrductRemak7, basic_products.basicPrductRemak7,
basic_products.basicPrductRemak8 basic_products.basicPrductRemak8,
basic_products.sfwblztlcp,
basic_products.cgzmraqxgxx,
basic_products.sfbjwycxsy,
basic_products.zdcfsycs,
basic_products.sfwwjbz,
basic_products.syqsfxyjxmj,
basic_products.mjfs,
basic_products.categoryName
FROM basic_udirel FROM basic_udirel
INNER JOIN basic_products INNER JOIN basic_products
on basic_udirel.uuid = basic_products.uuid on basic_udirel.uuid = basic_products.uuid
@ -1179,6 +1227,14 @@
basic_products.basicPrductRemak6, basic_products.basicPrductRemak6,
basic_products.basicPrductRemak7, basic_products.basicPrductRemak7,
basic_products.basicPrductRemak8, basic_products.basicPrductRemak8,
basic_products.sfwblztlcp,
basic_products.cgzmraqxgxx,
basic_products.sfbjwycxsy,
basic_products.zdcfsycs,
basic_products.sfwwjbz,
basic_products.syqsfxyjxmj,
basic_products.mjfs,
basic_products.categoryName,
company_product_relevance.unitFk, company_product_relevance.unitFk,
basic_corp.name companyName basic_corp.name companyName
FROM basic_udirel FROM basic_udirel

@ -105,16 +105,25 @@
basic_products.basicPrductRemak6, basic_products.basicPrductRemak6,
basic_products.basicPrductRemak7, basic_products.basicPrductRemak7,
basic_products.basicPrductRemak8, basic_products.basicPrductRemak8,
basic_products.sfwblztlcp,
basic_products.cgzmraqxgxx,
basic_products.sfbjwycxsy,
basic_products.zdcfsycs,
basic_products.sfwwjbz,
basic_products.syqsfxyjxmj,
basic_products.mjfs,
basic_products.categoryName,
basic_udirel.groupBuy, basic_udirel.groupBuy,
basic_udirel.id as uid,
basic_udirel.id as uid,
basic_corp.name companyName basic_corp.name companyName
FROM company_product_relevance FROM company_product_relevance
inner JOIN basic_udirel inner JOIN basic_udirel
ON company_product_relevance.udiRlIdFk = basic_udirel.id ON company_product_relevance.udiRlIdFk = basic_udirel.id
inner JOIN basic_products inner JOIN basic_products
ON basic_udirel.uuid = basic_products.uuid ON basic_udirel.uuid = basic_products.uuid
left JOIN basic_corp on basic_corp.erpId = company_product_relevance.customerId left JOIN basic_corp on basic_corp.erpId = company_product_relevance.customerId
left join basic_hosp_type bht on basic_udirel.relCode = bht.code left join basic_hosp_type bht on basic_udirel.relCode = bht.code
<where> <where>
<if test="ylqxzcrbarmc != '' and ylqxzcrbarmc != null"> <if test="ylqxzcrbarmc != '' and ylqxzcrbarmc != null">
AND ylqxzcrbarmc LIKE concat(#{ylqxzcrbarmc}, '%') AND ylqxzcrbarmc LIKE concat(#{ylqxzcrbarmc}, '%')
@ -130,19 +139,19 @@
</if> </if>
<if test="unionCode != '' and unionCode != null"> <if test="unionCode != '' and unionCode != null">
and ( and (
nameCode LIKE concat('%', #{unionCode}, '%') nameCode LIKE concat('%', #{unionCode}, '%')
or basic_products.ybbm LIKE concat('%', #{unionCode}, '%') or basic_products.ybbm LIKE concat('%', #{unionCode}, '%')
or basic_products.sptm LIKE concat('%', #{unionCode}, '%') or basic_products.sptm LIKE concat('%', #{unionCode}, '%')
) )
</if> </if>
<if test="thrPiId != '' and thrPiId != null"> <if test="thrPiId != '' and thrPiId != null">
and ( and (
basic_udirel.thirdId LIKE concat('%', #{thrPiId}, '%') basic_udirel.thirdId LIKE concat('%', #{thrPiId}, '%')
or basic_udirel.thirdId1 LIKE concat('%', #{thrPiId}, '%') or basic_udirel.thirdId1 LIKE concat('%', #{thrPiId}, '%')
or basic_udirel.thirdId2 LIKE concat('%', #{thrPiId}, '%') or basic_udirel.thirdId2 LIKE concat('%', #{thrPiId}, '%')
or basic_udirel.thirdId3 LIKE concat('%', #{thrPiId}, '%') or basic_udirel.thirdId3 LIKE concat('%', #{thrPiId}, '%')
or basic_udirel.thirdId4 LIKE concat('%', #{thrPiId}, '%') or basic_udirel.thirdId4 LIKE concat('%', #{thrPiId}, '%')
) )
</if> </if>
<if test="uuid != '' and uuid != null"> <if test="uuid != '' and uuid != null">
AND basic_udirel.uuid = #{uuid} AND basic_udirel.uuid = #{uuid}
@ -166,7 +175,7 @@
AND basic_products.originUuid is NULL AND basic_products.originUuid is NULL
</if> </if>
<if test="filterType != null and filterType == 3"> <if test="filterType != null and filterType == 3">
AND (basic_udirel.thirdId IS NULL or basic_udirel.thirdId='') AND (basic_udirel.thirdId IS NULL or basic_udirel.thirdId = '')
and basic_products.originUuid <![CDATA[<>]]> '' and basic_products.originUuid <![CDATA[<>]]> ''
</if> </if>
<if test="filterType != null and filterType == 4"> <if test="filterType != null and filterType == 4">
@ -287,9 +296,9 @@
<insert id="insertCompanyProductRelevance" <insert id="insertCompanyProductRelevance"
parameterType="com.glxp.api.entity.basic.UdiRlSupEntity"> parameterType="com.glxp.api.entity.basic.UdiRlSupEntity">
replace replace
INTO company_product_relevance(customerId, productId, enterpriseId, registrationId, INTO company_product_relevance(customerId, productId, enterpriseId, registrationId,
createTime, updateTime, auditStatus, productUuid, udiRlIdFk, unitFk, createTime, updateTime, auditStatus, productUuid, udiRlIdFk, unitFk,
price, createUser, updateUser) price, createUser, updateUser)
values (#{customerId}, values (#{customerId},
#{productId}, #{productId},
#{enterpriseId}, #{enterpriseId},
@ -309,9 +318,9 @@
<insert id="importCompanyProductRelevance" <insert id="importCompanyProductRelevance"
parameterType="com.glxp.api.entity.basic.UdiRlSupEntity"> parameterType="com.glxp.api.entity.basic.UdiRlSupEntity">
replace replace
INTO company_product_relevance(id, customerId, productId, enterpriseId, registrationId, INTO company_product_relevance(id, customerId, productId, enterpriseId, registrationId,
createTime, updateTime, auditStatus, productUuid, udiRlIdFk, unitFk, createTime, updateTime, auditStatus, productUuid, udiRlIdFk, unitFk,
price, createUser, updateUser) price, createUser, updateUser)
values (#{id}, values (#{id},
#{customerId}, #{customerId},
#{productId}, #{productId},
@ -356,9 +365,9 @@
<select id="selectSupRlCount" resultType="java.lang.Long"> <select id="selectSupRlCount" resultType="java.lang.Long">
select count(*) select count(*)
FROM company_product_relevance FROM company_product_relevance
inner JOIN basic_udirel inner JOIN basic_udirel
ON company_product_relevance.udiRlIdFk = basic_udirel.id ON company_product_relevance.udiRlIdFk = basic_udirel.id
inner JOIN basic_products ON basic_udirel.uuid = basic_products.uuid inner JOIN basic_products ON basic_udirel.uuid = basic_products.uuid
<where> <where>
<if test="nameCode != '' and nameCode != null"> <if test="nameCode != '' and nameCode != null">
AND nameCode LIKE concat(#{nameCode}, '%') AND nameCode LIKE concat(#{nameCode}, '%')

@ -128,14 +128,14 @@
<foreach collection="invoiceActions2" index="index" item="item" open="(" close=")" separator=","> <foreach collection="invoiceActions2" index="index" item="item" open="(" close=")" separator=",">
#{item} #{item}
</foreach> </foreach>
and status = 7) and (status = 7 or status = 10))
) )
</if> </if>
</if> </if>
</where> </where>
<choose> <choose>
<when test="(orderBy!=null ) and (sort=='desc' or sort=='asc')"> <when test="(orderBy != null) and (sort == 'desc' or sort == 'asc')">
order by ${orderBy} ${sort} order by ${orderBy} ${sort}
</when> </when>
<otherwise> <otherwise>
order by updateTime desc order by updateTime desc

@ -367,9 +367,9 @@ CALL Pro_Temp_ColumnWork('auth_role', 'isCustomer', 'int', 1);
CALL Pro_Temp_ColumnWork('sync_data_bustypes', 'id', 'bigint', 2); CALL Pro_Temp_ColumnWork('sync_data_bustypes', 'id', 'bigint', 2);
CALL Pro_Temp_ColumnWork('sync_data_set', 'orderInvoice', 'tinyint', 1); CALL Pro_Temp_ColumnWork('sync_data_set', 'orderInvoice', 'tinyint', 1);
CALL Pro_Temp_ColumnWork('io_order_invoice', 'id', 'bigint ', 2); CALL Pro_Temp_ColumnWork('io_order_invoice', 'id', 'bigint', 2);
CALL Pro_Temp_ColumnWork('io_order_detail_code', 'regStatus', 'varchar(255) ', 1); CALL Pro_Temp_ColumnWork('io_order_detail_code', 'regStatus', 'varchar(255)', 1);
CALL Pro_Temp_ColumnWork('io_order', 'reviewSp', 'tinyint', 1); CALL Pro_Temp_ColumnWork('io_order', 'reviewSp', 'tinyint', 1);
CALL Pro_Temp_ColumnWork('sync_data_bustypes', 'syncStatus', 'tinyint', 1); CALL Pro_Temp_ColumnWork('sync_data_bustypes', 'syncStatus', 'tinyint', 1);
@ -418,3 +418,13 @@ CALL Pro_Temp_ColumnWork('io_order_detail_biz', 'updateTime', 'datetime ', 1);
call Modify_index('basic_products', 'uuid', 'idx_uuid', 'BTREE'); call Modify_index('basic_products', 'uuid', 'idx_uuid', 'BTREE');
CALL Pro_Temp_ColumnWork('basic_products', 'sfwblztlcp', 'varchar(255)', 1);
CALL Pro_Temp_ColumnWork('basic_products', 'cgzmraqxgxx', 'varchar(255)', 1);
CALL Pro_Temp_ColumnWork('basic_products', 'sfbjwycxsy', 'varchar(255)', 1);
CALL Pro_Temp_ColumnWork('basic_products', 'zdcfsycs', 'varchar(255)', 1);
CALL Pro_Temp_ColumnWork('basic_products', 'sfwwjbz', 'varchar(255)', 1);
CALL Pro_Temp_ColumnWork('basic_products', 'syqsfxyjxmj', 'varchar(255)', 1);
CALL Pro_Temp_ColumnWork('basic_products', 'mjfs', 'varchar(255)', 1);
CALL Pro_Temp_ColumnWork('basic_products', 'categoryName', 'varchar(255)', 1);

Loading…
Cancel
Save