Merge remote-tracking branch 'origin/master'

cert
anthonywj 2 years ago
commit 6b7b6dba8d

@ -13,10 +13,7 @@ import com.glxp.api.entity.basic.BasicUdiProductEntity;
import com.glxp.api.entity.basic.ProductInfoEntity; import com.glxp.api.entity.basic.ProductInfoEntity;
import com.glxp.api.entity.basic.UdiCompanyEntity; import com.glxp.api.entity.basic.UdiCompanyEntity;
import com.glxp.api.entity.basic.UdiEntity; import com.glxp.api.entity.basic.UdiEntity;
import com.glxp.api.req.basic.BasicDictSelectRequest; import com.glxp.api.req.basic.*;
import com.glxp.api.req.basic.FilterUdiRelRequest;
import com.glxp.api.req.basic.ProductInfoFilterRequest;
import com.glxp.api.req.basic.UdiCompanyRequest;
import com.glxp.api.req.system.DeleteRequest; import com.glxp.api.req.system.DeleteRequest;
import com.glxp.api.res.PageSimpleResponse; import com.glxp.api.res.PageSimpleResponse;
import com.glxp.api.res.trace.TraceManuCodeRellResponse; import com.glxp.api.res.trace.TraceManuCodeRellResponse;
@ -143,39 +140,52 @@ public class UdiProductController extends BaseController {
return ResultVOUtils.success("更新成功!"); return ResultVOUtils.success("更新成功!");
} }
@AuthRuleAnnotation("")
@GetMapping("udi/basic/dict/filterylqxzcrbarmc")
public BaseResponse filterylqxzcrbarmc(BasicUdiProductRequest basicUdiProductRequest) {
List<BasicUdiProductEntity> basicUdiProductEntities = basicUdiProductService.filterYlqxzcrbarmc(basicUdiProductRequest);
PageInfo<BasicUdiProductEntity> pageInfo = new PageInfo<>(basicUdiProductEntities);
PageSimpleResponse<BasicUdiProductEntity> pageSimpleResponse = new PageSimpleResponse<>();
pageSimpleResponse.setTotal(pageInfo.getTotal());
pageSimpleResponse.setList(basicUdiProductEntities);
return ResultVOUtils.success(pageSimpleResponse);
}
@AuthRuleAnnotation("") @AuthRuleAnnotation("")
@GetMapping("udi/basic/dict/filterCpmctymc") @GetMapping("udi/basic/dict/filterCpmctymc")
public BaseResponse filterCpmctymc(ProductInfoFilterRequest productInfoFilterRequest) { public BaseResponse filterCpmctymc(BasicUdiProductRequest basicUdiProductRequest) {
List<ProductInfoEntity> productInfoEntities = productInfoService.filterCpmctymc(productInfoFilterRequest); List<BasicUdiProductEntity> basicUdiProductEntities = basicUdiProductService.filterCpmctymc(basicUdiProductRequest);
PageInfo<ProductInfoEntity> pageInfo = new PageInfo<>(productInfoEntities); PageInfo<BasicUdiProductEntity> pageInfo = new PageInfo<>(basicUdiProductEntities);
PageSimpleResponse<ProductInfoEntity> pageSimpleResponse = new PageSimpleResponse<>(); PageSimpleResponse<BasicUdiProductEntity> pageSimpleResponse = new PageSimpleResponse<>();
pageSimpleResponse.setTotal(pageInfo.getTotal()); pageSimpleResponse.setTotal(pageInfo.getTotal());
pageSimpleResponse.setList(productInfoEntities); pageSimpleResponse.setList(basicUdiProductEntities);
return ResultVOUtils.success(pageSimpleResponse); return ResultVOUtils.success(pageSimpleResponse);
} }
@AuthRuleAnnotation("") @AuthRuleAnnotation("")
@GetMapping("udi/basic/dict/filterGgxh") @GetMapping("udi/basic/dict/filterGgxh")
public BaseResponse filterGgxh(ProductInfoFilterRequest productInfoFilterRequest) { public BaseResponse filterGgxh(BasicUdiProductRequest basicUdiProductRequest) {
List<ProductInfoEntity> productInfoEntities = productInfoService.filterGgxh(productInfoFilterRequest); List<BasicUdiProductEntity> basicUdiProductEntities = basicUdiProductService.filterGgxh(basicUdiProductRequest);
PageInfo<ProductInfoEntity> pageInfo = new PageInfo<>(productInfoEntities); PageInfo<BasicUdiProductEntity> pageInfo = new PageInfo<>(basicUdiProductEntities);
PageSimpleResponse<ProductInfoEntity> pageSimpleResponse = new PageSimpleResponse<>(); PageSimpleResponse<BasicUdiProductEntity> pageSimpleResponse = new PageSimpleResponse<>();
pageSimpleResponse.setTotal(pageInfo.getTotal()); pageSimpleResponse.setTotal(pageInfo.getTotal());
pageSimpleResponse.setList(productInfoEntities); pageSimpleResponse.setList(basicUdiProductEntities);
return ResultVOUtils.success(pageSimpleResponse); return ResultVOUtils.success(pageSimpleResponse);
} }
@AuthRuleAnnotation("") @AuthRuleAnnotation("")
@GetMapping("udi/basic/dict/filterNameCode") @GetMapping("udi/basic/dict/filterNameCode")
public BaseResponse filterNameCode(ProductInfoFilterRequest productInfoFilterRequest) { public BaseResponse filterNameCode(BasicUdiProductRequest basicUdiProductRequest) {
List<ProductInfoEntity> productInfoEntities = productInfoService.filterNameCode(productInfoFilterRequest); List<BasicUdiProductEntity> basicUdiProductEntities = basicUdiProductService.filterNameCode(basicUdiProductRequest);
PageInfo<ProductInfoEntity> pageInfo = new PageInfo<>(productInfoEntities); PageInfo<BasicUdiProductEntity> pageInfo = new PageInfo<>(basicUdiProductEntities);
PageSimpleResponse<ProductInfoEntity> pageSimpleResponse = new PageSimpleResponse<>(); PageSimpleResponse<BasicUdiProductEntity> pageSimpleResponse = new PageSimpleResponse<>();
pageSimpleResponse.setTotal(pageInfo.getTotal()); pageSimpleResponse.setTotal(pageInfo.getTotal());
pageSimpleResponse.setList(productInfoEntities); pageSimpleResponse.setList(basicUdiProductEntities);
return ResultVOUtils.success(pageSimpleResponse); return ResultVOUtils.success(pageSimpleResponse);
} }

@ -2,7 +2,10 @@ package com.glxp.api.dao.basic;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.glxp.api.entity.basic.BasicUdiProductEntity; import com.glxp.api.entity.basic.BasicUdiProductEntity;
import com.glxp.api.entity.basic.ProductInfoEntity;
import com.glxp.api.req.basic.BasicUdiProductRequest;
import com.glxp.api.req.basic.FilterUdiRelRequest; import com.glxp.api.req.basic.FilterUdiRelRequest;
import com.glxp.api.req.basic.ProductInfoFilterRequest;
import com.glxp.api.res.basic.BasicUdiRelResponse; import com.glxp.api.res.basic.BasicUdiRelResponse;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
@ -12,4 +15,12 @@ import java.util.List;
public interface BasicUdiProductMapper extends BaseMapper<BasicUdiProductEntity> { public interface BasicUdiProductMapper extends BaseMapper<BasicUdiProductEntity> {
List<BasicUdiProductEntity> filterList(FilterUdiRelRequest filterUdiRelRequest); List<BasicUdiProductEntity> filterList(FilterUdiRelRequest filterUdiRelRequest);
List<BasicUdiProductEntity> filterYlqxzcrbarmc(BasicUdiProductRequest basicUdiProductRequest);
List<BasicUdiProductEntity> filterCpmctymc(BasicUdiProductRequest basicUdiProductRequest);
List<BasicUdiProductEntity> filterGgxh(BasicUdiProductRequest basicUdiProductRequest);
List<BasicUdiProductEntity> filterNameCode(BasicUdiProductRequest basicUdiProductRequest);
} }

@ -15,12 +15,6 @@ public interface ProductInfoDao {
List<ProductInfoEntity> filterProductGroup(ProductInfoFilterRequest productInfoFilterRequest); List<ProductInfoEntity> filterProductGroup(ProductInfoFilterRequest productInfoFilterRequest);
List<ProductInfoEntity> filterCpmctymc(ProductInfoFilterRequest productInfoFilterRequest);
List<ProductInfoEntity> filterGgxh(ProductInfoFilterRequest productInfoFilterRequest);
List<ProductInfoEntity> filterNameCode(ProductInfoFilterRequest productInfoFilterRequest);
List<ProductInfoEntity> filterUdiByTyshxydm(ProductInfoFilterRequest productInfoFilterRequest); List<ProductInfoEntity> filterUdiByTyshxydm(ProductInfoFilterRequest productInfoFilterRequest);
List<ProductInfoEntity> filterUdiByCreditNo(ProductInfoFilterRequest productInfoFilterRequest); List<ProductInfoEntity> filterUdiByCreditNo(ProductInfoFilterRequest productInfoFilterRequest);

@ -0,0 +1,261 @@
package com.glxp.api.req.basic;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.glxp.api.util.page.ListPageRequest;
import lombok.Data;
import java.util.Date;
@Data
public class BasicUdiProductRequest extends ListPageRequest {
private Long id;
/**
*
*/
private String nameCode;
/**
*
*/
private String packRatio;
/**
*
*/
private String packLevel;
/**
*
*/
private Integer bhxjsl;
/**
*
*/
private Integer bhzxxsbzsl;
/**
* 使:
* 使
*/
private Integer zxxsbzbhsydysl;
/**
*
*/
private String bhxjcpbm;
/**
*
*/
private String bzcj;
/**
* ERPID
*/
private String thirdProductNo;
/**
* 1.2
*/
private Integer addType;
/**
* key
*/
private String deviceRecordKey;
/**
* 使
*/
private Integer isUseDy;
/**
* ERP
*/
private String thirdProductName;
/**
*
*/
private String cpmctymc;
/**
*
*/
private String cplb;
/**
*
*/
private String flbm;
/**
*
*/
private String ggxh;
/**
*
*/
private String qxlb;
/**
*
*/
private String tyshxydm;
/**
* /
*/
private String ylqxzcrbarmc;
/**
* "/
*/
private String zczbhhzbapzbh;
/**
* /
*/
private String ylqxzcrbarywmc;
/**
* 使
*/
private String sydycpbs;
/**
* UUID
*/
private String uuid;
/**
*
*/
private String sjcpbm;
/**
*
*/
private Integer versionNumber;
/**
* 1.2使3.4
*/
private Integer diType;
/**
*
*/
private String scbssfbhph;
/**
*
*/
private String scbssfbhxlh;
/**
*
*/
private String scbssfbhscrq;
/**
*
*/
private String scbssfbhsxrq;
/**
*
*/
private String ybbm;
/**
*
*/
private String spmc;
private String cphhhbh;
private String cpms;
private String cpbsbmtxmc;
/**
*
*/
private Boolean isNewest;
/**
*
*/
private Date updateTime;
/**
*
*/
private String cplx;
/**
*
*/
private String hchzsb;
/**
* / 1 0
*/
private String sfwblztlcp;
/**
* MR 0 1 28
* 3 MR
*/
private String cgzmraqxgxx;
/**
* 使:0 1
*/
private String sfbjwycxsy;
/**
* 使
*/
private String zdcfsycs;
/**
* :1 0
*/
private String sfwwjbz;
/**
* 使:1 0
*/
private String syqsfxyjxmj;
/**
*
*/
private String mjfs;
/**
*
*/
private String qtxxdwzlj;
/**
*
*/
private String categoryName;
private String manufactory;
private String measname;
private String remark;
private Long updateUser;
}

@ -1,9 +1,17 @@
package com.glxp.api.service.basic; package com.glxp.api.service.basic;
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
import com.glxp.api.common.res.BaseResponse;
import com.glxp.api.common.util.ResultVOUtils;
import com.glxp.api.entity.basic.BasicUdiProductEntity; import com.glxp.api.entity.basic.BasicUdiProductEntity;
import com.glxp.api.entity.basic.ProductInfoEntity;
import com.glxp.api.entity.basic.UdiCompanyEntity;
import com.glxp.api.req.basic.BasicUdiProductRequest;
import com.glxp.api.req.basic.FilterUdiRelRequest; import com.glxp.api.req.basic.FilterUdiRelRequest;
import com.glxp.api.req.basic.ProductInfoFilterRequest;
import com.glxp.api.req.basic.UdiCompanyRequest;
import javax.validation.Valid;
import java.util.List; import java.util.List;
public interface BasicUdiProductService extends IService<BasicUdiProductEntity> { public interface BasicUdiProductService extends IService<BasicUdiProductEntity> {
@ -13,5 +21,14 @@ public interface BasicUdiProductService extends IService<BasicUdiProductEntity>
public List<BasicUdiProductEntity> filterList(FilterUdiRelRequest filterUdiRelRequest); public List<BasicUdiProductEntity> filterList(FilterUdiRelRequest filterUdiRelRequest);
boolean updateByUuid(BasicUdiProductEntity basicUdiProductEntity); boolean updateByUuid(BasicUdiProductEntity basicUdiProductEntity);
List<BasicUdiProductEntity> filterYlqxzcrbarmc(BasicUdiProductRequest basicUdiProductRequest);
List<BasicUdiProductEntity> filterCpmctymc(BasicUdiProductRequest basicUdiProductRequest);
List<BasicUdiProductEntity> filterGgxh(BasicUdiProductRequest basicUdiProductRequest);
List<BasicUdiProductEntity> filterNameCode(BasicUdiProductRequest basicUdiProductRequest);
} }

@ -11,11 +11,6 @@ public interface ProductInfoService {
//赋码用 //赋码用
//获取产品名称通用名称 //获取产品名称通用名称
List<ProductInfoEntity> filterCpmctymc(ProductInfoFilterRequest productInfoFilterRequest);
List<ProductInfoEntity> filterGgxh(ProductInfoFilterRequest productInfoFilterRequest);
List<ProductInfoEntity> filterNameCode(ProductInfoFilterRequest productInfoFilterRequest);
List<ProductInfoEntity> filterProductInfo(ProductInfoFilterRequest productInfoFilterRequest); List<ProductInfoEntity> filterProductInfo(ProductInfoFilterRequest productInfoFilterRequest);

@ -3,7 +3,10 @@ package com.glxp.api.service.basic.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageHelper;
import com.glxp.api.entity.basic.BasicUdiRelEntity; import com.glxp.api.entity.basic.BasicUdiRelEntity;
import com.glxp.api.entity.basic.ProductInfoEntity;
import com.glxp.api.req.basic.BasicUdiProductRequest;
import com.glxp.api.req.basic.FilterUdiRelRequest; import com.glxp.api.req.basic.FilterUdiRelRequest;
import com.glxp.api.req.basic.ProductInfoFilterRequest;
import com.glxp.api.service.basic.BasicUdiProductService; import com.glxp.api.service.basic.BasicUdiProductService;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
@ -11,6 +14,7 @@ import com.glxp.api.dao.basic.BasicUdiProductMapper;
import com.glxp.api.entity.basic.BasicUdiProductEntity; import com.glxp.api.entity.basic.BasicUdiProductEntity;
import javax.annotation.Resource; import javax.annotation.Resource;
import java.util.Collections;
import java.util.List; import java.util.List;
@Service @Service
@ -35,4 +39,48 @@ public class BasicUdiProductServiceImpl extends ServiceImpl<BasicUdiProductMappe
public boolean updateByUuid(BasicUdiProductEntity basicUdiProductEntity) { public boolean updateByUuid(BasicUdiProductEntity basicUdiProductEntity) {
return basicUdiProductMapper.update(basicUdiProductEntity, new QueryWrapper<BasicUdiProductEntity>().eq("uuid", basicUdiProductEntity.getUuid())) > 0; return basicUdiProductMapper.update(basicUdiProductEntity, new QueryWrapper<BasicUdiProductEntity>().eq("uuid", basicUdiProductEntity.getUuid())) > 0;
} }
@Override
public List<BasicUdiProductEntity> filterYlqxzcrbarmc(BasicUdiProductRequest basicUdiProductRequest) {
if (basicUdiProductRequest == null) {
return Collections.emptyList();
}
int offset = (basicUdiProductRequest.getPage() - 1) * basicUdiProductRequest.getLimit();
PageHelper.offsetPage(offset, basicUdiProductRequest.getLimit());
List<BasicUdiProductEntity> data = basicUdiProductMapper.filterYlqxzcrbarmc(basicUdiProductRequest);
return data;
}
@Override
public List<BasicUdiProductEntity> filterCpmctymc(BasicUdiProductRequest basicUdiProductRequest) {
if (basicUdiProductRequest == null) {
return Collections.emptyList();
}
int offset = (basicUdiProductRequest.getPage() - 1) * basicUdiProductRequest.getLimit();
PageHelper.offsetPage(offset, basicUdiProductRequest.getLimit());
List<BasicUdiProductEntity> data = basicUdiProductMapper.filterCpmctymc(basicUdiProductRequest);
return data;
}
@Override
public List<BasicUdiProductEntity> filterGgxh(BasicUdiProductRequest basicUdiProductRequest) {
if (basicUdiProductRequest == null) {
return Collections.emptyList();
}
int offset = (basicUdiProductRequest.getPage() - 1) * basicUdiProductRequest.getLimit();
PageHelper.offsetPage(offset, basicUdiProductRequest.getLimit());
List<BasicUdiProductEntity> data = basicUdiProductMapper.filterGgxh(basicUdiProductRequest);
return data;
}
@Override
public List<BasicUdiProductEntity> filterNameCode(BasicUdiProductRequest basicUdiProductRequest) {
if (basicUdiProductRequest == null) {
return Collections.emptyList();
}
int offset = (basicUdiProductRequest.getPage() - 1) * basicUdiProductRequest.getLimit();
PageHelper.offsetPage(offset, basicUdiProductRequest.getLimit());
List<BasicUdiProductEntity> data = basicUdiProductMapper.filterNameCode(basicUdiProductRequest);
return data;
}
} }

@ -20,39 +20,6 @@ public class ProductInfoServiceImpl implements ProductInfoService {
@Resource @Resource
ProductInfoDao productInfoDao; ProductInfoDao productInfoDao;
@Override
public List<ProductInfoEntity> filterCpmctymc(ProductInfoFilterRequest productInfoFilterRequest) {
if (productInfoFilterRequest == null) {
return Collections.emptyList();
}
int offset = (productInfoFilterRequest.getPage() - 1) * productInfoFilterRequest.getLimit();
PageHelper.offsetPage(offset, productInfoFilterRequest.getLimit());
List<ProductInfoEntity> data = productInfoDao.filterCpmctymc(productInfoFilterRequest);
return data;
}
@Override
public List<ProductInfoEntity> filterGgxh(ProductInfoFilterRequest productInfoFilterRequest) {
if (productInfoFilterRequest == null) {
return Collections.emptyList();
}
int offset = (productInfoFilterRequest.getPage() - 1) * productInfoFilterRequest.getLimit();
PageHelper.offsetPage(offset, productInfoFilterRequest.getLimit());
List<ProductInfoEntity> data = productInfoDao.filterGgxh(productInfoFilterRequest);
return data;
}
@Override
public List<ProductInfoEntity> filterNameCode(ProductInfoFilterRequest productInfoFilterRequest) {
if (productInfoFilterRequest == null) {
return Collections.emptyList();
}
int offset = (productInfoFilterRequest.getPage() - 1) * productInfoFilterRequest.getLimit();
PageHelper.offsetPage(offset, productInfoFilterRequest.getLimit());
List<ProductInfoEntity> data = productInfoDao.filterNameCode(productInfoFilterRequest);
return data;
}
@Override @Override
public List<ProductInfoEntity> filterProductInfo(ProductInfoFilterRequest productInfoFilterRequest) { public List<ProductInfoEntity> filterProductInfo(ProductInfoFilterRequest productInfoFilterRequest) {
if (productInfoFilterRequest == null) { if (productInfoFilterRequest == null) {

@ -45,4 +45,124 @@
</where> </where>
ORDER BY updateTime DESC ORDER BY updateTime DESC
</select> </select>
<select id="filterYlqxzcrbarmc" parameterType="com.glxp.api.req.basic.BasicUdiProductRequest"
resultType="com.glxp.api.entity.basic.BasicUdiProductEntity">
select ylqxzcrbarmc
from basic_udi_product
<where>
<if test="tyshxydm != '' and tyshxydm != null">
AND tyshxydm = #{tyshxydm}
</if>
<if test="ylqxzcrbarmc != '' and ylqxzcrbarmc != null">
AND ylqxzcrbarmc LIKE concat('%', #{ylqxzcrbarmc}, '%')
</if>
<if test="cpmctymc != '' and cpmctymc != null">
AND cpmctymc LIKE concat('%',#{cpmctymc},'%')
</if>
<if test="nameCode != '' and nameCode != null">
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>
</where>
GROUP BY ylqxzcrbarmc
</select>
<select id="filterCpmctymc" parameterType="com.glxp.api.req.basic.BasicUdiProductRequest"
resultType="com.glxp.api.entity.basic.BasicUdiProductEntity">
select cpmctymc
from basic_udi_product
<where>
<if test="tyshxydm != '' and tyshxydm != null">
AND tyshxydm = #{tyshxydm}
</if>
<if test="ylqxzcrbarmc != '' and ylqxzcrbarmc != null">
AND ylqxzcrbarmc = #{ylqxzcrbarmc}
</if>
<if test="cpmctymc != '' and cpmctymc != null">
AND cpmctymc LIKE concat('%',#{cpmctymc},'%')
</if>
<if test="nameCode != '' and nameCode != null">
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>
</where>
GROUP BY cpmctymc
</select>
<select id="filterGgxh" parameterType="com.glxp.api.req.basic.BasicUdiProductRequest"
resultType="com.glxp.api.entity.basic.BasicUdiProductEntity">
select ggxh
from basic_udi_product
<where>
<if test="tyshxydm != '' and tyshxydm != null">
AND tyshxydm = #{tyshxydm}
</if>
<if test="ylqxzcrbarmc != '' and ylqxzcrbarmc != null">
AND ylqxzcrbarmc = #{ylqxzcrbarmc}
</if>
<if test="cpmctymc != '' and cpmctymc != null">
AND cpmctymc = #{cpmctymc}
</if>
<if test="ggxh != '' and ggxh != null">
AND ggxh LIKE concat('%',#{ggxh},'%')
</if>
<if test="nameCode != '' and nameCode != null">
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>
</where>
GROUP BY ggxh
</select>
<select id="filterNameCode" parameterType="com.glxp.api.req.basic.BasicUdiProductRequest"
resultType="com.glxp.api.entity.basic.BasicUdiProductEntity">
select nameCode
from basic_udi_product
<where>
<if test="tyshxydm != '' and tyshxydm != null">
AND tyshxydm = #{tyshxydm}
</if>
<if test="ylqxzcrbarmc != '' and ylqxzcrbarmc != null">
AND ylqxzcrbarmc = #{ylqxzcrbarmc}
</if>
<if test="cpmctymc != '' and cpmctymc != null">
AND cpmctymc = #{cpmctymc}
</if>
<if test="ggxh != '' and ggxh != null">
AND ggxh = #{ggxh}
</if>
<if test="nameCode != '' and nameCode != null">
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>
</where>
GROUP BY nameCode
</select>
</mapper> </mapper>

@ -70,98 +70,7 @@
GROUP BY uuid GROUP BY uuid
</select> </select>
<select id="filterCpmctymc" parameterType="com.glxp.api.req.basic.ProductInfoFilterRequest"
resultType="com.glxp.api.entity.basic.ProductInfoEntity">
select cpmctymc
from productinfo
<where>
<if test="tyshxydm != '' and tyshxydm != null">
AND tyshxydm = #{tyshxydm}
</if>
<if test="ylqxzcrbarmc != '' and ylqxzcrbarmc != null">
AND ylqxzcrbarmc = #{ylqxzcrbarmc}
</if>
<if test="cpmctymc != '' and cpmctymc != null">
AND cpmctymc LIKE concat('%',#{cpmctymc},'%')
</if>
<if test="nameCode != '' and nameCode != null">
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>
</where>
GROUP BY cpmctymc
</select>
<select id="filterGgxh" parameterType="com.glxp.api.req.basic.ProductInfoFilterRequest"
resultType="com.glxp.api.entity.basic.ProductInfoEntity">
select ggxh
from productinfo
<where>
<if test="tyshxydm != '' and tyshxydm != null">
AND tyshxydm = #{tyshxydm}
</if>
<if test="ylqxzcrbarmc != '' and ylqxzcrbarmc != null">
AND ylqxzcrbarmc = #{ylqxzcrbarmc}
</if>
<if test="cpmctymc != '' and cpmctymc != null">
AND cpmctymc = #{cpmctymc}
</if>
<if test="ggxh != '' and ggxh != null">
AND ggxh LIKE concat('%',#{ggxh},'%')
</if>
<if test="nameCode != '' and nameCode != null">
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>
</where>
GROUP BY ggxh
</select>
<select id="filterNameCode" parameterType="com.glxp.api.req.basic.ProductInfoFilterRequest"
resultType="com.glxp.api.entity.basic.ProductInfoEntity">
select nameCode
from productinfo
<where>
<if test="tyshxydm != '' and tyshxydm != null">
AND tyshxydm = #{tyshxydm}
</if>
<if test="ylqxzcrbarmc != '' and ylqxzcrbarmc != null">
AND ylqxzcrbarmc = #{ylqxzcrbarmc}
</if>
<if test="cpmctymc != '' and cpmctymc != null">
AND cpmctymc = #{cpmctymc}
</if>
<if test="ggxh != '' and ggxh != null">
AND ggxh = #{ggxh}
</if>
<if test="nameCode != '' and nameCode != null">
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>
</where>
GROUP BY nameCode
</select>
<select id="filterUdiByTyshxydm" parameterType="com.glxp.api.req.basic.ProductInfoFilterRequest" <select id="filterUdiByTyshxydm" parameterType="com.glxp.api.req.basic.ProductInfoFilterRequest"

@ -6,12 +6,14 @@
SELECT tmo.*, mid.*, uc.companyName SELECT tmo.*, mid.*, uc.companyName
FROM trace_manu_order tmo FROM trace_manu_order tmo
LEFT JOIN user_company uc ON uc.id = tmo.companyIdFk LEFT JOIN user_company uc ON uc.id = tmo.companyIdFk
LEFT JOIN (SELECT tr.recordCode,tr.createUser,tr.remark,trd.batchNo,trd.traceType LEFT JOIN (
SELECT tr.recordCode, tr.createUser, tr.remark, trd.batchNo, trd.traceType
FROM trace_record_log tr FROM trace_record_log tr
LEFT JOIN trace_product_record trd ON trd.recordIdFk = tr.id) mid ON mid.recordCode = tmo.recordCode LEFT JOIN trace_product_record trd ON trd.id = tr.traceProductIdFk
) mid ON mid.recordCode = tmo.recordCode
<where> <where>
<if test="recordCode != '' and recordCode != null"> <if test="recordCode != '' and recordCode != null">
and recordCode = #{recordCode} and mid.recordCode = #{recordCode}
</if> </if>
<if test="companyName != '' and companyName != null"> <if test="companyName != '' and companyName != null">
AND companyName LIKE CONCAT('%', #{companyName}, '%') AND companyName LIKE CONCAT('%', #{companyName}, '%')

@ -3,13 +3,9 @@
<mapper namespace="com.glxp.api.dao.trace.TraceRecordMapper"> <mapper namespace="com.glxp.api.dao.trace.TraceRecordMapper">
<select id="filterTraces" parameterType="com.glxp.api.req.trace.TraceRecordRequest" <select id="filterTraces" parameterType="com.glxp.api.req.trace.TraceRecordRequest"
resultType="com.glxp.api.res.trace.TraceRecordResponse"> resultType="com.glxp.api.res.trace.TraceRecordResponse">
SELECT tr.recordCode, tr.remark, trd.*, mid.* SELECT tr.recordCode, tr.remark, trd.*
FROM trace_record_log tr FROM trace_record_log tr
LEFT JOIN trace_product_record trd ON trd.id = tr.traceProductIdFk LEFT JOIN trace_product_record trd ON trd.id = tr.traceProductIdFk
LEFT JOIN (SELECT tor.billNo, tor.fromCorp, tor.toCorp, tor.createUser, uc.companyName
FROM trace_order tor
LEFT JOIN user_company uc ON uc.id = tor.companyIdFk) mid
ON mid.billNo = tr.recordCode
<where> <where>
<if test="recordCode != '' and recordCode != null"> <if test="recordCode != '' and recordCode != null">
and recordCode = #{recordCode} and recordCode = #{recordCode}

Loading…
Cancel
Save