Merge branch 'dev' into pro

# Conflicts:
#	src/main/resources/application-test.yml
pro
郑明梁 2 years ago
commit 3621d1e14e

@ -20,6 +20,7 @@ import com.glxp.api.res.auth.LoginResponse;
import com.glxp.api.res.auth.LoginUserInfoResponse;
import com.glxp.api.res.inout.ioUploadOrderResponse;
import com.glxp.api.service.inout.IoOrderUtilsService;
import com.glxp.api.res.auth.WebTitleResponse;
import com.glxp.api.service.system.CompanyService;
import com.glxp.api.service.monitor.LogininforService;
import com.glxp.api.common.enums.ResultEnum;
@ -30,6 +31,7 @@ import com.glxp.api.util.*;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.*;
@ -318,6 +320,7 @@ public class LoginController extends BaseController {
@Autowired
private InvWarehouseDao invWarehouseDao;
/**
*
*
@ -395,4 +398,15 @@ public class LoginController extends BaseController {
@Value("${WEB_TITLE}")
private String WEB_TITLE;
@GetMapping("/spms/getTitleConfig")
public BaseResponse getTitleConfig() {
WebTitleResponse webTitleResponse = new WebTitleResponse();
webTitleResponse.setTitle(WEB_TITLE);
return ResultVOUtils.success(webTitleResponse);
}
}

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

@ -627,7 +627,7 @@ public class IoCodeTempController extends BaseController {
exitLocalEntity.setReCount(exitLocalEntity.getMyCount() * udiCalCountUtil.getActCount(udiRelevanceResponses.get(0)));
if (!StringUtils.isNotBlank(exitLocalEntity.getSerialNo())) {
if (StringUtils.isNotBlank(exitLocalEntity.getSerialNo())) {
return ResultVOUtils.error(500, "重复扫码!");
}
@ -1113,6 +1113,7 @@ public class IoCodeTempController extends BaseController {
orderEntity.setUpdateUser(getUserId() + "");
orderEntity.setUpdateTime(new Date());
orderService.update(orderEntity);
return ResultVOUtils.success("删除成功!");
}

@ -8,6 +8,7 @@ import cn.hutool.core.util.StrUtil;
import com.github.pagehelper.PageInfo;
import com.glxp.api.annotation.AuthRuleAnnotation;
import com.glxp.api.annotation.Log;
import com.glxp.api.annotation.RepeatSubmit;
import com.glxp.api.common.enums.ResultEnum;
import com.glxp.api.common.res.BaseResponse;
import com.glxp.api.common.util.ResultVOUtils;
@ -632,7 +633,7 @@ public class IoOrderDetailBizController extends BaseController {
return ResultVOUtils.success("修改成功!");
}
@RepeatSubmit
@PostMapping("/udiwms/inout/biz/insertInvoice")
@Log(title = "发票管理", businessType = BusinessType.INSERT)
public BaseResponse insertInvoice(@RequestBody IoOrderInvoiceEntity ioOrderInvoice) {

@ -37,7 +37,6 @@ public class IoOrderDetailCodeController {
@GetMapping("udiwms/inout/order/draft/detailCode")
public BaseResponse getDraftsDetailCode(String orderId) {
List<IoOrderDetailCodeEntity> orderEntityList = ioOrderDetailCodeService.checkOrderList(orderId);
List<IoOrderDetailCodeResponse> list = ioOrderDetailCodeService.getDetailCodeResponse(orderEntityList);
PageSimpleResponse<IoOrderDetailCodeResponse> pageSimpleResponse = new PageSimpleResponse<>();
pageSimpleResponse.setTotal(Long.valueOf(list.size()));

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

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

@ -65,6 +65,16 @@ public class UdiProductEntity {
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 produceDate;

@ -0,0 +1,10 @@
package com.glxp.api.res.auth;
import lombok.Data;
@Data
public class WebTitleResponse {
private String title;
}

@ -111,6 +111,15 @@ public class UdiRelevanceResponse {
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() {
if (bhzxxsbzsl == null || bhzxxsbzsl == 0) {
@ -137,6 +146,7 @@ public class UdiRelevanceResponse {
return false;
return allowNoProduct;
}
public Boolean getAllowNoSerial() {
if (allowNoSerial == null)
return false;

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

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

@ -41,7 +41,7 @@ public class IoOrderDetailBizServiceImpl implements IoOrderDetailBizService {
@Override
public List<IoOrderDetailBizEntity> findByOrderId(String orderId) {
return ioOrderDetailBizDao.selectList(new QueryWrapper<IoOrderDetailBizEntity>().eq("orderIdFk", orderId).orderByDesc("updateTime"));
return ioOrderDetailBizDao.selectList(new QueryWrapper<IoOrderDetailBizEntity>().eq("orderIdFk", orderId));
}
@Override

@ -40,7 +40,7 @@ public class IoOrderDetailCodeServiceImpl implements IoOrderDetailCodeService {
@Override
public List<IoOrderDetailCodeEntity> findByOrderId(String orderId) {
return ioOrderDetailCodeDao.selectList(new QueryWrapper<IoOrderDetailCodeEntity>().eq("orderIdFk", orderId).orderByDesc("updateTime"));
return ioOrderDetailCodeDao.selectList(new QueryWrapper<IoOrderDetailCodeEntity>().eq("orderIdFk", orderId).orderByDesc("id"));
}
@Override

@ -653,7 +653,7 @@ public class IoOrderServiceImpl implements IoOrderService {
break;
case Constant.ORDER_STATUS_INCODE:
filterOrderRequest.setStatuses(Arrays.asList(1, 3, 5, 10, 7));
filterOrderRequest.setStatuses(Arrays.asList(1, 3));
filterOrderRequest.setDealStatuses(Arrays.asList(1, 2, 3, 4));
break;
case Constant.ORDER_STATUS_WAIT_AUDITED:

@ -1,9 +1,13 @@
package com.glxp.api.task;
import cn.hutool.core.exceptions.ExceptionUtil;
import cn.hutool.core.util.StrUtil;
import com.alibaba.fastjson.JSONArray;
import com.glxp.api.constant.AsyncDiDlHelper;
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.UdiProductService;
import com.glxp.api.util.CustomUtil;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@ -25,8 +29,12 @@ public class AsyncDiDlService {
ProductInfoService productInfoService;
@Resource
AsyncDiDlHelper asyncDiDlHelper;
@Resource
UdiProductService udiProductService;
private static final Logger logger = LoggerFactory.getLogger(AsyncDiDlService.class);
@Async
public void asyncDiByTime(String updateTime) {
int page = 1;
@ -35,6 +43,109 @@ public class AsyncDiDlService {
logger.info("更新时间:" + updateTime + "----" + page + "----" + limit);
List<ProductInfoEntity> productInfoEntityList = asyncDiDlHelper.dlByTime(udiUrl, page, limit, updateTime);
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);
if (productInfoEntityList.size() < limit) {
break;

@ -54,3 +54,4 @@ SPMS_KEY: lCOdWCBKS6Kw45wdnnqUTELXyuSKnXEs
API_KEY: 1101
API_SECRET: zBITspLNvuoEd4FaamlSoqxRHmNsmQ9L
WEB_TITLE: 平潭协和医院

@ -51,3 +51,4 @@ SPMS_KEY: lCOdWCBKS6Kw45wdnnqUTELXyuSKnXEs
API_KEY: 1101
API_SECRET: zBITspLNvuoEd4FaamlSoqxRHmNsmQ9L
WEB_TITLE: 平潭协和医院

@ -51,3 +51,4 @@ SPMS_KEY: lCOdWCBKS6Kw45wdnnqUTELXyuSKnXEs
API_KEY: 1101
API_SECRET: zBITspLNvuoEd4FaamlSoqxRHmNsmQ9L
WEB_TITLE: 平潭协和医院

@ -51,3 +51,4 @@ SPMS_KEY: lCOdWCBKS6Kw45wdnnqUTELXyuSKnXEs
API_KEY: 1101
API_SECRET: zBITspLNvuoEd4FaamlSoqxRHmNsmQ9L
WEB_TITLE: 平潭协和医院

@ -51,3 +51,4 @@ SPMS_KEY: lCOdWCBKS6Kw45wdnnqUTELXyuSKnXEs
API_KEY: 1101
API_SECRET: zBITspLNvuoEd4FaamlSoqxRHmNsmQ9L
WEB_TITLE: 平潭协和医院

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

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

@ -57,7 +57,15 @@
basic_products.basicPrductRemak5,
basic_products.basicPrductRemak6,
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
inner JOIN basic_products
ON basic_products.uuid = basic_udirel.uuid
@ -177,6 +185,14 @@
basic_products.basicPrductRemak6,
basic_products.basicPrductRemak7,
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,
basic_corp.name companyName
FROM basic_udirel
@ -305,8 +321,16 @@
basic_products.basicPrductRemak5,
basic_products.basicPrductRemak6,
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.basicPrductRemak8
basic_products.basicPrductRemak8
FROM basic_products
inner JOIN basic_udirel
ON basic_products.uuid = basic_udirel.uuid
@ -481,7 +505,15 @@
basic_products.basicPrductRemak5,
basic_products.basicPrductRemak6,
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
inner JOIN basic_udirel
ON basic_products.uuid = basic_udirel.uuid
@ -648,7 +680,15 @@
basic_products.basicPrductRemak5,
basic_products.basicPrductRemak6,
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
INNER JOIN basic_products on basic_udirel.uuid = basic_products.uuid
<where>
@ -1068,7 +1108,15 @@
basic_products.basicPrductRemak5,
basic_products.basicPrductRemak6,
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
INNER JOIN basic_products
on basic_udirel.uuid = basic_products.uuid
@ -1179,6 +1227,14 @@
basic_products.basicPrductRemak6,
basic_products.basicPrductRemak7,
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,
basic_corp.name companyName
FROM basic_udirel

@ -105,16 +105,25 @@
basic_products.basicPrductRemak6,
basic_products.basicPrductRemak7,
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.id as uid,
basic_udirel.id as uid,
basic_corp.name companyName
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
left join basic_hosp_type bht on basic_udirel.relCode = bht.code
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
left join basic_hosp_type bht on basic_udirel.relCode = bht.code
<where>
<if test="ylqxzcrbarmc != '' and ylqxzcrbarmc != null">
AND ylqxzcrbarmc LIKE concat(#{ylqxzcrbarmc}, '%')
@ -130,19 +139,19 @@
</if>
<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}, '%')
)
nameCode 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}, '%')
)
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}, '%')
)
</if>
<if test="uuid != '' and uuid != null">
AND basic_udirel.uuid = #{uuid}
@ -166,7 +175,7 @@
AND basic_products.originUuid is NULL
</if>
<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[<>]]> ''
</if>
<if test="filterType != null and filterType == 4">
@ -287,9 +296,9 @@
<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)
INTO company_product_relevance(customerId, productId, enterpriseId, registrationId,
createTime, updateTime, auditStatus, productUuid, udiRlIdFk, unitFk,
price, createUser, updateUser)
values (#{customerId},
#{productId},
#{enterpriseId},
@ -309,9 +318,9 @@
<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)
INTO company_product_relevance(id, customerId, productId, enterpriseId, registrationId,
createTime, updateTime, auditStatus, productUuid, udiRlIdFk, unitFk,
price, createUser, updateUser)
values (#{id},
#{customerId},
#{productId},
@ -356,9 +365,9 @@
<select id="selectSupRlCount" resultType="java.lang.Long">
select count(*)
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
inner JOIN basic_udirel
ON company_product_relevance.udiRlIdFk = basic_udirel.id
inner JOIN basic_products ON basic_udirel.uuid = basic_products.uuid
<where>
<if test="nameCode != '' and nameCode != null">
AND nameCode LIKE concat(#{nameCode}, '%')

@ -1,7 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.glxp.api.dao.inout.IoCodeTempDao">
<select id="selectCodeList" resultType="com.glxp.api.res.inout.IoCodeTempResponse">
select *,
(select `name` from basic_corp where erpId = io_code_temp.supId) supName
@ -14,7 +13,6 @@
AND code = #{code}
</if>
</where>
order by id desc
</select>
</mapper>
</mapper>

@ -128,14 +128,14 @@
<foreach collection="invoiceActions2" index="index" item="item" open="(" close=")" separator=",">
#{item}
</foreach>
and status = 7)
and (status = 7 or status = 10))
)
</if>
</if>
</where>
<choose>
<when test="(orderBy!=null ) and (sort=='desc' or sort=='asc')">
order by ${orderBy} ${sort}
<when test="(orderBy != null) and (sort == 'desc' or sort == 'asc')">
order by ${orderBy} ${sort}
</when>
<otherwise>
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_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('sync_data_bustypes', 'syncStatus', 'tinyint', 1);
@ -380,6 +380,8 @@ CALL Pro_Temp_ColumnWork('basic_bussiness_type', 'spaceOut', 'tinyint', 1);
CALL Pro_Temp_ColumnWork('io_order_detail_code', 'id', 'bigint ', 2);
CALL Pro_Temp_ColumnWork('io_order_detail_biz', 'id', 'bigint ', 2);
CALL Pro_Temp_ColumnWork('io_order_invoice', 'bizIdFk', 'bigint ', 2);
@ -412,7 +414,17 @@ INSERT ignore INTO `sys_pdf_template_relevance_statemen`(`id`, `templateId`, `cu
VALUES (5, 33, 110, 0, NULL, '内部码报表打印', NULL, NULL, NULL, NULL, 'reportForms');
CALL Pro_Temp_ColumnWork('basic_udirel', 'zdcfsycs', 'int', 1);
CALL Pro_Temp_ColumnWork('io_order_detail_code', 'updateTime', 'datetime', 1);
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