Merge remote-tracking branch 'origin/master'
commit
6c13eb05d4
@ -0,0 +1,17 @@
|
||||
package com.glxp.api.dao.basic;
|
||||
|
||||
|
||||
import com.glxp.api.entity.basic.BasicProductSetEntity;
|
||||
import com.glxp.api.req.basic.FilterBasicProductSetrequest;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Mapper
|
||||
public interface BasicProductSetDao {
|
||||
|
||||
List<BasicProductSetEntity> filterSetup(FilterBasicProductSetrequest filterBasicProductSetrequest);
|
||||
|
||||
boolean updateSetup(BasicProductSetEntity basicProductSetEntity);
|
||||
|
||||
}
|
@ -0,0 +1,48 @@
|
||||
package com.glxp.api.dao.thrsys;
|
||||
|
||||
|
||||
import com.glxp.api.entity.thrsys.ThrProductsAddDiEntity;
|
||||
import com.glxp.api.req.thrsys.FilterThrProductsRequest;
|
||||
import com.glxp.api.res.thrsys.ThrProductsAddDiResponse;
|
||||
import com.glxp.api.res.thrsys.UdiInfoResponse;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Mapper
|
||||
public interface ThrProductsAddDiDao {
|
||||
|
||||
/**
|
||||
* 添加产品信息
|
||||
*
|
||||
* @param list
|
||||
* @return
|
||||
*/
|
||||
boolean insertThrDiProducts(@Param("list") List<ThrProductsAddDiEntity> list);
|
||||
|
||||
/**
|
||||
* 根据ID删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
boolean deleteById(Long id);
|
||||
|
||||
List<ThrProductsAddDiResponse> filterThrProductsList(FilterThrProductsRequest filterThrProductsRequest);
|
||||
|
||||
boolean updateDiProduct(ThrProductsAddDiEntity thrProductsAddDiEntity);
|
||||
|
||||
UdiInfoResponse getDiProductDetail(@Param("uuid") String uuid);
|
||||
|
||||
/** 根据ID查询 */
|
||||
ThrProductsAddDiEntity filterThrProductsGetId(@Param("id") Integer id);
|
||||
ThrProductsAddDiEntity filterThrProductsGetUuid(@Param("uuid") String uuid);
|
||||
|
||||
|
||||
boolean insert(ThrProductsAddDiEntity thrProductsAddDiEntity);
|
||||
|
||||
List<ThrProductsAddDiResponse> filterThrProductsDiList(FilterThrProductsRequest filterThrProductsRequest);
|
||||
|
||||
List<ThrProductsAddDiEntity> filterThrProductsDiLists(FilterThrProductsRequest filterThrProductsRequest);
|
||||
}
|
@ -0,0 +1,25 @@
|
||||
package com.glxp.api.entity.basic;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
@TableName(value = "basic_product_set")
|
||||
public class BasicProductSetEntity {
|
||||
|
||||
@TableId(type = IdType.AUTO)
|
||||
private Integer id;
|
||||
private String parmName;
|
||||
private String parmKey;
|
||||
private boolean enable;
|
||||
private boolean supSelect;
|
||||
private boolean supAdd;
|
||||
private boolean localAdd;
|
||||
private boolean localEdit;
|
||||
private String remark;
|
||||
private Integer sort;
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,101 @@
|
||||
package com.glxp.api.entity.thrsys;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 供应商新增DI产品实体类
|
||||
*/
|
||||
@Data
|
||||
public class ThrProductsAddDiEntity {
|
||||
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 国家库产品UUID
|
||||
*/
|
||||
private String uuid;
|
||||
|
||||
/**
|
||||
* 添加此产品的客户ID
|
||||
*/
|
||||
private String customerId;
|
||||
|
||||
/**
|
||||
* 添加时间
|
||||
*/
|
||||
private Date createTime;
|
||||
|
||||
/**
|
||||
* 审核时间
|
||||
*/
|
||||
private Date auditTime;
|
||||
|
||||
/**
|
||||
* 审核人
|
||||
*/
|
||||
private String auditUser;
|
||||
|
||||
/**
|
||||
* 审核状态
|
||||
*/
|
||||
private int status;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
|
||||
private String thirdSysFk;
|
||||
private String code;
|
||||
private String sptm;
|
||||
private String ybbm;
|
||||
private String measname;
|
||||
private String manufactory;
|
||||
private String spmc;
|
||||
private String cpms;
|
||||
private String selectThridSysStr;
|
||||
|
||||
private String price;
|
||||
private String basicPrductRemak1;
|
||||
private String basicPrductRemak2;
|
||||
private String basicPrductRemak3;
|
||||
private String basicPrductRemak4;
|
||||
private String basicPrductRemak5;
|
||||
private String basicPrductRemak6;
|
||||
private String basicPrductRemak7;
|
||||
private String basicPrductRemak8;
|
||||
|
||||
|
||||
|
||||
private String name;
|
||||
private String spec;
|
||||
private String registerNo;
|
||||
private String thirdName;
|
||||
private String cplb;
|
||||
private String flbm;
|
||||
private String qxlb;
|
||||
private String tyshxydm;
|
||||
private String zczbhhzbapzbh;
|
||||
private String ylqxzcrbarmc;
|
||||
private String ylqxzcrbarywmc;
|
||||
private Date updateTime;
|
||||
private String supName;
|
||||
private boolean isChecked;
|
||||
private String corpName;
|
||||
|
||||
//添加字段
|
||||
private String model; //型号
|
||||
private String standard; //规格型号,二合一字段
|
||||
private String qtbm; //其他编码
|
||||
private String zczyxqz; //注册有效期截止时间
|
||||
private Integer checkStatus;
|
||||
private String thirdSys;
|
||||
private String relId;
|
||||
private String nameCode;
|
||||
private Integer type;
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,14 @@
|
||||
package com.glxp.api.req.basic;
|
||||
|
||||
|
||||
import com.glxp.api.util.page.ListPageRequest;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class FilterBasicProductSetrequest extends ListPageRequest {
|
||||
|
||||
|
||||
String parmName;
|
||||
Boolean enable;
|
||||
|
||||
}
|
@ -0,0 +1,25 @@
|
||||
package com.glxp.api.req.basic;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
//选入产品补充信息
|
||||
@Data
|
||||
public class SupplementRequest {
|
||||
|
||||
//补充信息:
|
||||
private String basicPrductRemak1;
|
||||
private String basicPrductRemak2;
|
||||
private String basicPrductRemak3;
|
||||
private String basicPrductRemak4;
|
||||
private String basicPrductRemak5;
|
||||
private String basicPrductRemak6;
|
||||
private String basicPrductRemak7;
|
||||
private String basicPrductRemak8;
|
||||
private String sptm;
|
||||
private String ybbm;
|
||||
private String measname;
|
||||
private String manufactory;
|
||||
private String spmc;
|
||||
private String cpms;
|
||||
private String price;
|
||||
}
|
@ -0,0 +1,12 @@
|
||||
package com.glxp.api.req.purchase;
|
||||
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class FilterImageRequest {
|
||||
|
||||
private String imageUrl;
|
||||
private String certFileUrl;
|
||||
|
||||
}
|
@ -0,0 +1,49 @@
|
||||
package com.glxp.api.req.thrsys;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 供应商添加DI产品信息接口参数
|
||||
*/
|
||||
@Data
|
||||
public class AddThrDiProductsRequest {
|
||||
|
||||
/**
|
||||
* 产品UUID
|
||||
*/
|
||||
@NotEmpty(message = "请选择需要添加的产品")
|
||||
private List<String> uuids;
|
||||
|
||||
/**
|
||||
* 客户ID
|
||||
*/
|
||||
@NotNull(message = "参数错误")
|
||||
private Long customerId;
|
||||
|
||||
|
||||
private String thirdSysFk;
|
||||
private String code;
|
||||
private String sptm;
|
||||
private String ybbm;
|
||||
private String measname;
|
||||
private String manufactory;
|
||||
private String spmc;
|
||||
private String cpms;
|
||||
private String price;
|
||||
private List<String> selectThirdSys;
|
||||
|
||||
private String basicPrductRemak1;
|
||||
private String basicPrductRemak2;
|
||||
private String basicPrductRemak3;
|
||||
private String basicPrductRemak4;
|
||||
private String basicPrductRemak5;
|
||||
private String basicPrductRemak6;
|
||||
private String basicPrductRemak7;
|
||||
private String basicPrductRemak8;
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,86 @@
|
||||
package com.glxp.api.res.basic;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class CompanyProductRelevanceResponse {
|
||||
|
||||
private int id;
|
||||
private Integer rlId;
|
||||
private String thirdId;
|
||||
private String thirdName;
|
||||
private String uuid;
|
||||
private String originUuid;
|
||||
private String nameCode;
|
||||
private String packLevel;
|
||||
private String packRatio;
|
||||
private Integer bhxjsl;
|
||||
private Integer bhzxxsbzsl;
|
||||
private Integer zxxsbzbhsydysl;
|
||||
private String bhxjcpbm;
|
||||
private String sjcpbm; //
|
||||
private String bzcj;
|
||||
private String deviceRecordKey;
|
||||
private int isUseDy;
|
||||
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;
|
||||
private int versionNumber;
|
||||
private int diType;
|
||||
|
||||
private String thirdId1;
|
||||
private String thirdId2;
|
||||
private String thirdId3;
|
||||
private String thirdId4;
|
||||
private String thirdName1;
|
||||
private String thirdName2;
|
||||
private String thirdName3;
|
||||
private String thirdName4;
|
||||
|
||||
private String ybbm;
|
||||
private String sptm;
|
||||
private String manufactory;
|
||||
private String measname;
|
||||
private Boolean isDisable;
|
||||
private long customerId;
|
||||
|
||||
private String auditStatus;
|
||||
private Boolean isLock;
|
||||
private Integer lockStatus;
|
||||
private String companyName;
|
||||
private String mainId;
|
||||
private String mainName;
|
||||
private Boolean isAdavence;
|
||||
|
||||
private String scbssfbhph;
|
||||
private String scbssfbhxlh;
|
||||
private String scbssfbhscrq;
|
||||
private String scbssfbhsxrq;
|
||||
private String cpms;
|
||||
private String supName;
|
||||
private boolean allowNoBatch;
|
||||
private boolean allowNoExpire;
|
||||
private boolean allowNoProduct;
|
||||
private boolean allowNoSerial;
|
||||
private String spmc;
|
||||
private Integer productType;
|
||||
private String price;
|
||||
|
||||
//产品代理商
|
||||
private String cpdls;
|
||||
private String basicPrductRemak1;
|
||||
private String basicPrductRemak2;
|
||||
private String basicPrductRemak3;
|
||||
private String basicPrductRemak4;
|
||||
private String basicPrductRemak5;
|
||||
private String basicPrductRemak6;
|
||||
private String basicPrductRemak7;
|
||||
private String basicPrductRemak8;
|
||||
}
|
@ -0,0 +1,50 @@
|
||||
package com.glxp.api.res.thrsys;
|
||||
|
||||
|
||||
import com.glxp.api.entity.thrsys.ThrProductsAddDiEntity;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 供应商添加DI产品信息数据响应类
|
||||
*/
|
||||
@Data
|
||||
public class ThrProductsAddDiResponse extends ThrProductsAddDiEntity {
|
||||
|
||||
private Long id;
|
||||
|
||||
private String uuid;
|
||||
|
||||
private String nameCode;
|
||||
|
||||
private String cpmctymc;
|
||||
|
||||
private String ggxh;
|
||||
|
||||
private String ylqxzcrbarmc;
|
||||
|
||||
private String zczbhhzbapzbh;
|
||||
|
||||
private int status;
|
||||
|
||||
private String customerId;
|
||||
|
||||
private String remark;
|
||||
|
||||
private String companyName;
|
||||
|
||||
/**
|
||||
* 规格型号
|
||||
*/
|
||||
private String standard;
|
||||
|
||||
private String price;
|
||||
private String basicPrductRemak1;
|
||||
private String basicPrductRemak2;
|
||||
private String basicPrductRemak3;
|
||||
private String basicPrductRemak4;
|
||||
private String basicPrductRemak5;
|
||||
private String basicPrductRemak6;
|
||||
private String basicPrductRemak7;
|
||||
private String basicPrductRemak8;
|
||||
|
||||
}
|
@ -0,0 +1,443 @@
|
||||
package com.glxp.api.res.thrsys;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class UdiInfoResponse {
|
||||
|
||||
private Integer id;
|
||||
private String nameCode;
|
||||
private String packRatio;
|
||||
private String packLevel;
|
||||
private Integer bhxjsl;
|
||||
private Integer bhzxxsbzsl;
|
||||
private Integer zxxsbzbhsydysl;
|
||||
private String bhxjcpbm;
|
||||
private String sjcpbm; //
|
||||
private String bzcj;
|
||||
private String addType;
|
||||
private String deviceRecordKey;
|
||||
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;
|
||||
private String uuid;
|
||||
private Integer versionNumber;
|
||||
private Integer diType;
|
||||
private String thirdId;
|
||||
private String thirdName;
|
||||
private String ybbm;
|
||||
private String sptm;
|
||||
private String manufactory;
|
||||
private String measname;
|
||||
private Integer productType;
|
||||
private String scbssfbhph;
|
||||
private String scbssfbhxlh;
|
||||
private String scbssfbhscrq;
|
||||
private String scbssfbhsxrq;
|
||||
private String cpms;
|
||||
private String spmc;
|
||||
private String originUuid;
|
||||
|
||||
//本地生成信息
|
||||
private String batchNo;
|
||||
private String produceDate;
|
||||
private String expireDate;
|
||||
private String serialNo;
|
||||
private String udi;
|
||||
private String code;
|
||||
private Integer count;
|
||||
private String warehouseCode;
|
||||
private String udplatCode;
|
||||
private String relId;//关联ID主键
|
||||
private Integer status;
|
||||
private String supId;
|
||||
private boolean isAdavence;
|
||||
private boolean isDisable;
|
||||
private boolean useMuti;
|
||||
|
||||
private Boolean isCheck;
|
||||
private boolean allowNoBatch;
|
||||
private boolean allowNoExpire;
|
||||
private boolean allowNoProduct;
|
||||
private boolean allowNoSerial;
|
||||
|
||||
private String price;
|
||||
private String cplx;
|
||||
private String hchzsb;
|
||||
|
||||
//产品代理商
|
||||
private String cpdls;
|
||||
|
||||
|
||||
private String basicPrductRemak1;
|
||||
private String basicPrductRemak2;
|
||||
private String basicPrductRemak3;
|
||||
private String basicPrductRemak4;
|
||||
private String basicPrductRemak5;
|
||||
private String basicPrductRemak6;
|
||||
private String basicPrductRemak7;
|
||||
private String basicPrductRemak8;
|
||||
private String remark;
|
||||
|
||||
public Integer getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Integer id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getNameCode() {
|
||||
return nameCode;
|
||||
}
|
||||
|
||||
public void setNameCode(String nameCode) {
|
||||
this.nameCode = nameCode;
|
||||
}
|
||||
|
||||
public String getPackRatio() {
|
||||
return packRatio;
|
||||
}
|
||||
|
||||
public void setPackRatio(String packRatio) {
|
||||
this.packRatio = packRatio;
|
||||
}
|
||||
|
||||
public String getPackLevel() {
|
||||
return packLevel;
|
||||
}
|
||||
|
||||
public void setPackLevel(String packLevel) {
|
||||
this.packLevel = packLevel;
|
||||
}
|
||||
|
||||
public Integer getBhxjsl() {
|
||||
if (bhxjsl == null || bhxjsl == 0) {
|
||||
return 1;
|
||||
}
|
||||
return bhxjsl;
|
||||
}
|
||||
|
||||
public void setBhxjsl(Integer bhxjsl) {
|
||||
this.bhxjsl = bhxjsl;
|
||||
}
|
||||
|
||||
public Integer getBhzxxsbzsl() {
|
||||
if (bhzxxsbzsl == null || bhzxxsbzsl == 0) {
|
||||
return 1;
|
||||
}
|
||||
return bhzxxsbzsl;
|
||||
}
|
||||
|
||||
public String getSptm() {
|
||||
return sptm;
|
||||
}
|
||||
|
||||
public void setSptm(String sptm) {
|
||||
this.sptm = sptm;
|
||||
}
|
||||
|
||||
public String getManufactory() {
|
||||
return manufactory;
|
||||
}
|
||||
|
||||
public void setManufactory(String manufactory) {
|
||||
this.manufactory = manufactory;
|
||||
}
|
||||
|
||||
public String getMeasname() {
|
||||
return measname;
|
||||
}
|
||||
|
||||
public void setMeasname(String measname) {
|
||||
this.measname = measname;
|
||||
}
|
||||
|
||||
public void setBhzxxsbzsl(Integer bhzxxsbzsl) {
|
||||
this.bhzxxsbzsl = bhzxxsbzsl;
|
||||
}
|
||||
|
||||
public Integer getZxxsbzbhsydysl() {
|
||||
if (zxxsbzbhsydysl == null || zxxsbzbhsydysl == 0) {
|
||||
return 1;
|
||||
}
|
||||
return zxxsbzbhsydysl;
|
||||
}
|
||||
|
||||
public void setZxxsbzbhsydysl(Integer zxxsbzbhsydysl) {
|
||||
this.zxxsbzbhsydysl = zxxsbzbhsydysl;
|
||||
}
|
||||
|
||||
public String getBhxjcpbm() {
|
||||
return bhxjcpbm;
|
||||
}
|
||||
|
||||
public void setBhxjcpbm(String bhxjcpbm) {
|
||||
this.bhxjcpbm = bhxjcpbm;
|
||||
}
|
||||
|
||||
public String getSjcpbm() {
|
||||
return sjcpbm;
|
||||
}
|
||||
|
||||
public void setSjcpbm(String sjcpbm) {
|
||||
this.sjcpbm = sjcpbm;
|
||||
}
|
||||
|
||||
public String getBzcj() {
|
||||
return bzcj;
|
||||
}
|
||||
|
||||
public void setBzcj(String bzcj) {
|
||||
this.bzcj = bzcj;
|
||||
}
|
||||
|
||||
public String getAddType() {
|
||||
return addType;
|
||||
}
|
||||
|
||||
public void setAddType(String addType) {
|
||||
this.addType = addType;
|
||||
}
|
||||
|
||||
public String getDeviceRecordKey() {
|
||||
return deviceRecordKey;
|
||||
}
|
||||
|
||||
public void setDeviceRecordKey(String deviceRecordKey) {
|
||||
this.deviceRecordKey = deviceRecordKey;
|
||||
}
|
||||
|
||||
|
||||
public String getCpmctymc() {
|
||||
return cpmctymc;
|
||||
}
|
||||
|
||||
public void setCpmctymc(String cpmctymc) {
|
||||
this.cpmctymc = cpmctymc;
|
||||
}
|
||||
|
||||
public String getCplb() {
|
||||
return cplb;
|
||||
}
|
||||
|
||||
public void setCplb(String cplb) {
|
||||
this.cplb = cplb;
|
||||
}
|
||||
|
||||
public String getFlbm() {
|
||||
return flbm;
|
||||
}
|
||||
|
||||
public void setFlbm(String flbm) {
|
||||
this.flbm = flbm;
|
||||
}
|
||||
|
||||
public String getGgxh() {
|
||||
return ggxh;
|
||||
}
|
||||
|
||||
public void setGgxh(String ggxh) {
|
||||
this.ggxh = ggxh;
|
||||
}
|
||||
|
||||
public String getQxlb() {
|
||||
return qxlb;
|
||||
}
|
||||
|
||||
public void setQxlb(String qxlb) {
|
||||
this.qxlb = qxlb;
|
||||
}
|
||||
|
||||
public String getTyshxydm() {
|
||||
return tyshxydm;
|
||||
}
|
||||
|
||||
public void setTyshxydm(String tyshxydm) {
|
||||
this.tyshxydm = tyshxydm;
|
||||
}
|
||||
|
||||
public String getYlqxzcrbarmc() {
|
||||
return ylqxzcrbarmc;
|
||||
}
|
||||
|
||||
public void setYlqxzcrbarmc(String ylqxzcrbarmc) {
|
||||
this.ylqxzcrbarmc = ylqxzcrbarmc;
|
||||
}
|
||||
|
||||
public String getZczbhhzbapzbh() {
|
||||
return zczbhhzbapzbh;
|
||||
}
|
||||
|
||||
public void setZczbhhzbapzbh(String zczbhhzbapzbh) {
|
||||
this.zczbhhzbapzbh = zczbhhzbapzbh;
|
||||
}
|
||||
|
||||
public String getYlqxzcrbarywmc() {
|
||||
return ylqxzcrbarywmc;
|
||||
}
|
||||
|
||||
public void setYlqxzcrbarywmc(String ylqxzcrbarywmc) {
|
||||
this.ylqxzcrbarywmc = ylqxzcrbarywmc;
|
||||
}
|
||||
|
||||
public String getSydycpbs() {
|
||||
return sydycpbs;
|
||||
}
|
||||
|
||||
public void setSydycpbs(String sydycpbs) {
|
||||
this.sydycpbs = sydycpbs;
|
||||
}
|
||||
|
||||
public String getUuid() {
|
||||
return uuid;
|
||||
}
|
||||
|
||||
public void setUuid(String uuid) {
|
||||
this.uuid = uuid;
|
||||
}
|
||||
|
||||
public Integer getVersionNumber() {
|
||||
return versionNumber;
|
||||
}
|
||||
|
||||
public void setVersionNumber(Integer versionNumber) {
|
||||
this.versionNumber = versionNumber;
|
||||
}
|
||||
|
||||
public Integer getDiType() {
|
||||
return diType;
|
||||
}
|
||||
|
||||
public void setDiType(Integer diType) {
|
||||
this.diType = diType;
|
||||
}
|
||||
|
||||
public String getThirdId() {
|
||||
return thirdId;
|
||||
}
|
||||
|
||||
public void setThirdId(String thirdId) {
|
||||
this.thirdId = thirdId;
|
||||
}
|
||||
|
||||
public String getThirdName() {
|
||||
return thirdName;
|
||||
}
|
||||
|
||||
public void setThirdName(String thirdName) {
|
||||
this.thirdName = thirdName;
|
||||
}
|
||||
|
||||
public String getBatchNo() {
|
||||
return batchNo;
|
||||
}
|
||||
|
||||
public void setBatchNo(String batchNo) {
|
||||
this.batchNo = batchNo;
|
||||
}
|
||||
|
||||
public String getProduceDate() {
|
||||
return produceDate;
|
||||
}
|
||||
|
||||
public void setProduceDate(String produceDate) {
|
||||
this.produceDate = produceDate;
|
||||
}
|
||||
|
||||
public String getExpireDate() {
|
||||
return expireDate;
|
||||
}
|
||||
|
||||
public void setExpireDate(String expireDate) {
|
||||
this.expireDate = expireDate;
|
||||
}
|
||||
|
||||
public String getSerialNo() {
|
||||
return serialNo;
|
||||
}
|
||||
|
||||
public void setSerialNo(String serialNo) {
|
||||
this.serialNo = serialNo;
|
||||
}
|
||||
|
||||
public String getUdi() {
|
||||
return udi;
|
||||
}
|
||||
|
||||
public void setUdi(String udi) {
|
||||
this.udi = udi;
|
||||
}
|
||||
|
||||
public String getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public void setCode(String code) {
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
public Integer getCount() {
|
||||
if (count == null)
|
||||
return 1;
|
||||
return count;
|
||||
}
|
||||
|
||||
public void setCount(Integer count) {
|
||||
this.count = count;
|
||||
}
|
||||
|
||||
public String getWarehouseCode() {
|
||||
return warehouseCode;
|
||||
}
|
||||
|
||||
public void setWarehouseCode(String warehouseCode) {
|
||||
this.warehouseCode = warehouseCode;
|
||||
}
|
||||
|
||||
public String getYbbm() {
|
||||
return ybbm;
|
||||
}
|
||||
|
||||
public void setYbbm(String ybbm) {
|
||||
this.ybbm = ybbm;
|
||||
}
|
||||
|
||||
public Boolean getCheck() {
|
||||
return isCheck;
|
||||
}
|
||||
|
||||
public void setCheck(Boolean check) {
|
||||
isCheck = check;
|
||||
}
|
||||
|
||||
public Integer getProductType() {
|
||||
return productType;
|
||||
}
|
||||
|
||||
public void setProductType(Integer productType) {
|
||||
this.productType = productType;
|
||||
}
|
||||
|
||||
|
||||
public static UdiInfoResponse initUdiInfoEntity(UdiInfoResponse udiInfoEntity) {
|
||||
if (StrUtil.isNotEmpty(udiInfoEntity.getScbssfbhph()) && "否".equals(udiInfoEntity.getScbssfbhph())) {
|
||||
udiInfoEntity.setAllowNoBatch(true);
|
||||
}
|
||||
if (StrUtil.isNotEmpty(udiInfoEntity.getScbssfbhscrq()) && "否".equals(udiInfoEntity.getScbssfbhscrq())) {
|
||||
udiInfoEntity.setAllowNoProduct(true);
|
||||
}
|
||||
if (StrUtil.isNotEmpty(udiInfoEntity.getScbssfbhsxrq()) && "否".equals(udiInfoEntity.getScbssfbhsxrq())) {
|
||||
udiInfoEntity.setAllowNoExpire(true);
|
||||
}
|
||||
return udiInfoEntity;
|
||||
}
|
||||
}
|
@ -0,0 +1,19 @@
|
||||
package com.glxp.api.service.basic;
|
||||
|
||||
|
||||
import com.glxp.api.entity.basic.BasicProductSetEntity;
|
||||
import com.glxp.api.req.basic.FilterBasicProductSetrequest;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
public interface BasicProductSetService {
|
||||
|
||||
List<BasicProductSetEntity> filterSetup(FilterBasicProductSetrequest filterBasicProductSetrequest);
|
||||
|
||||
Map<String, BasicProductSetEntity> filterAllEnable();
|
||||
|
||||
|
||||
boolean updateSetup(BasicProductSetEntity basicProductSetEntity);
|
||||
|
||||
}
|
@ -0,0 +1,22 @@
|
||||
package com.glxp.api.service.basic;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.glxp.api.entity.basic.CompanyProductRelevanceEntity;
|
||||
import com.glxp.api.req.basic.CompanyProductRelevanceRequest;
|
||||
import com.glxp.api.res.basic.CompanyProductRelevanceResponse;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface CompanyProductRelevanceService extends IService<CompanyProductRelevanceEntity> {
|
||||
|
||||
List<CompanyProductRelevanceResponse> filterUdiGp(CompanyProductRelevanceRequest basicInstrumentMaintainRequest);
|
||||
|
||||
boolean insertCompanyProductRelevance(CompanyProductRelevanceEntity companyCertEntity);
|
||||
|
||||
boolean deleteById(String id);
|
||||
|
||||
boolean deleteByRlId(String id);
|
||||
|
||||
boolean isExitByRelId(String relId);
|
||||
}
|
@ -0,0 +1,60 @@
|
||||
package com.glxp.api.service.basic.impl;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import com.glxp.api.dao.basic.BasicProductSetDao;
|
||||
import com.glxp.api.entity.basic.BasicProductSetEntity;
|
||||
import com.glxp.api.req.basic.FilterBasicProductSetrequest;
|
||||
import com.glxp.api.service.basic.BasicProductSetService;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@Service
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public class BasicProductSetServiceImpl implements BasicProductSetService {
|
||||
@Resource
|
||||
BasicProductSetDao basicProductSetDao;
|
||||
|
||||
@Override
|
||||
public List<BasicProductSetEntity> filterSetup(FilterBasicProductSetrequest filterBasicProductSetrequest) {
|
||||
if (filterBasicProductSetrequest == null) {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
if (filterBasicProductSetrequest.getPage() != null) {
|
||||
int offset = (filterBasicProductSetrequest.getPage() - 1) * filterBasicProductSetrequest.getLimit();
|
||||
PageHelper.offsetPage(offset, filterBasicProductSetrequest.getLimit());
|
||||
}
|
||||
return basicProductSetDao.filterSetup(filterBasicProductSetrequest);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, BasicProductSetEntity> filterAllEnable() {
|
||||
|
||||
FilterBasicProductSetrequest filterBasicProductSetrequest = new FilterBasicProductSetrequest();
|
||||
filterBasicProductSetrequest.setEnable(true);
|
||||
List<BasicProductSetEntity> basicProductSetEntities = basicProductSetDao.filterSetup(filterBasicProductSetrequest);
|
||||
|
||||
Map<String, BasicProductSetEntity> basicProductSetEntityMap = new HashMap<>();
|
||||
|
||||
if (CollUtil.isNotEmpty(basicProductSetEntities)) {
|
||||
for (BasicProductSetEntity basicProductSetEntity : basicProductSetEntities) {
|
||||
basicProductSetEntityMap.put(basicProductSetEntity.getParmKey(), basicProductSetEntity);
|
||||
}
|
||||
}
|
||||
|
||||
return basicProductSetEntityMap;
|
||||
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean updateSetup(BasicProductSetEntity basicProductSetEntity) {
|
||||
return basicProductSetDao.updateSetup(basicProductSetEntity);
|
||||
}
|
||||
}
|
@ -0,0 +1,59 @@
|
||||
package com.glxp.api.service.basic.impl;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import com.glxp.api.dao.basic.CompanyProductRelevanceDao;
|
||||
import com.glxp.api.entity.basic.CompanyProductRelevanceEntity;
|
||||
import com.glxp.api.req.basic.CompanyProductRelevanceRequest;
|
||||
import com.glxp.api.res.basic.CompanyProductRelevanceResponse;
|
||||
import com.glxp.api.service.basic.CompanyProductRelevanceService;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public class CompanyProductRelevanceServiceImpl extends ServiceImpl<CompanyProductRelevanceDao, CompanyProductRelevanceEntity>
|
||||
implements CompanyProductRelevanceService {
|
||||
@Resource
|
||||
CompanyProductRelevanceDao companyProductRelevanceDao;
|
||||
|
||||
@Override
|
||||
public List<CompanyProductRelevanceResponse> filterUdiGp(CompanyProductRelevanceRequest basicInstrumentMaintainRequest) {
|
||||
if (basicInstrumentMaintainRequest == null) {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
if (basicInstrumentMaintainRequest.getPage() != null) {
|
||||
int offset = (basicInstrumentMaintainRequest.getPage() - 1) * basicInstrumentMaintainRequest.getLimit();
|
||||
PageHelper.offsetPage(offset, basicInstrumentMaintainRequest.getLimit());
|
||||
}
|
||||
|
||||
List<CompanyProductRelevanceResponse> data = companyProductRelevanceDao.filterUdiGp(basicInstrumentMaintainRequest);
|
||||
return data;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean insertCompanyProductRelevance(CompanyProductRelevanceEntity companyProductRelevanceEntity) {
|
||||
return companyProductRelevanceDao.insertCompanyProductRelevance(companyProductRelevanceEntity);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean deleteById(String id) {
|
||||
return companyProductRelevanceDao.deleteById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean deleteByRlId(String id) {
|
||||
return companyProductRelevanceDao.deleteByRlId(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isExitByRelId(String relId) {
|
||||
return companyProductRelevanceDao.exists(new QueryWrapper<CompanyProductRelevanceEntity>().eq("udiRlIdFk", relId));
|
||||
}
|
||||
}
|
@ -0,0 +1,41 @@
|
||||
package com.glxp.api.service.thrsys;
|
||||
|
||||
|
||||
import com.glxp.api.entity.thrsys.ThrProductsAddDiEntity;
|
||||
import com.glxp.api.req.thrsys.AddThrDiProductsRequest;
|
||||
import com.glxp.api.req.thrsys.FilterThrProductsRequest;
|
||||
import com.glxp.api.res.thrsys.ThrProductsAddDiResponse;
|
||||
import com.glxp.api.res.thrsys.UdiInfoResponse;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface ThrProductsAddDiService {
|
||||
|
||||
List<ThrProductsAddDiResponse> filterThrProductsList(FilterThrProductsRequest filterThrProductsRequest);
|
||||
|
||||
ThrProductsAddDiResponse selecById(Long id);
|
||||
|
||||
ThrProductsAddDiResponse selecByUuid(String uuid);
|
||||
|
||||
/**
|
||||
* 删除DI产品信息
|
||||
*
|
||||
* @param id
|
||||
*/
|
||||
boolean delThrDiProducts(Long id);
|
||||
|
||||
boolean updateDiProduct(ThrProductsAddDiEntity thrProductsAddDiEntity);
|
||||
|
||||
boolean addThrAddDiProducts(AddThrDiProductsRequest thrDiProductsRequest);
|
||||
|
||||
UdiInfoResponse getDiProductDetail(String uuid);
|
||||
|
||||
/** 根据ID查询 */
|
||||
ThrProductsAddDiEntity filterThrProductsGetId( Integer id);
|
||||
|
||||
boolean insertThrProducts(ThrProductsAddDiEntity thrProductsAddDiEntity);
|
||||
|
||||
List<ThrProductsAddDiResponse> filterThrProductsDiList(FilterThrProductsRequest filterThrProductsRequest);
|
||||
|
||||
List<ThrProductsAddDiEntity> filterThrProductsDiLists(FilterThrProductsRequest filterThrProductsRequest);
|
||||
}
|
@ -0,0 +1,175 @@
|
||||
package com.glxp.api.service.thrsys.impl;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import cn.hutool.json.JSONUtil;
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import com.glxp.api.dao.thrsys.ThrProductsAddDiDao;
|
||||
import com.glxp.api.entity.basic.ProductInfoEntity;
|
||||
import com.glxp.api.entity.thrsys.ThrProductsAddDiEntity;
|
||||
import com.glxp.api.req.thrsys.AddThrDiProductsRequest;
|
||||
import com.glxp.api.req.thrsys.FilterThrProductsRequest;
|
||||
import com.glxp.api.res.thrsys.ThrProductsAddDiResponse;
|
||||
import com.glxp.api.res.thrsys.UdiInfoResponse;
|
||||
import com.glxp.api.service.basic.ProductInfoService;
|
||||
import com.glxp.api.service.thrsys.ThrProductsAddDiService;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public class ThrProductsAddDiServiceImpl implements ThrProductsAddDiService {
|
||||
|
||||
@Resource
|
||||
private ThrProductsAddDiDao thrProductsAddDiDao;
|
||||
@Resource
|
||||
private ProductInfoService productInfoService;
|
||||
|
||||
@Override
|
||||
public List<ThrProductsAddDiResponse> filterThrProductsList(FilterThrProductsRequest filterThrProductsRequest) {
|
||||
if (null != filterThrProductsRequest && filterThrProductsRequest.getPage() != null) {
|
||||
int offset = (filterThrProductsRequest.getPage() - 1) * filterThrProductsRequest.getLimit();
|
||||
PageHelper.offsetPage(offset, filterThrProductsRequest.getLimit());
|
||||
}
|
||||
List<ThrProductsAddDiResponse> thrProductsAddDiResponses = thrProductsAddDiDao.filterThrProductsList(filterThrProductsRequest);
|
||||
|
||||
if (CollUtil.isNotEmpty(thrProductsAddDiResponses)) {
|
||||
thrProductsAddDiResponses.forEach(thrProductsAddDiResponse -> {
|
||||
thrProductsAddDiResponse.setStandard(thrProductsAddDiResponse.getSpec());
|
||||
thrProductsAddDiResponse.setZczbhhzbapzbh(thrProductsAddDiResponse.getRegisterNo());
|
||||
});
|
||||
}
|
||||
return thrProductsAddDiResponses;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ThrProductsAddDiResponse selecById(Long id) {
|
||||
FilterThrProductsRequest filterThrProductsRequest = new FilterThrProductsRequest();
|
||||
filterThrProductsRequest.setId(id);
|
||||
List<ThrProductsAddDiResponse> thrProductsAddDiResponses = thrProductsAddDiDao.filterThrProductsList(filterThrProductsRequest);
|
||||
if (CollUtil.isNotEmpty(thrProductsAddDiResponses)) {
|
||||
return thrProductsAddDiResponses.get(0);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ThrProductsAddDiResponse selecByUuid(String uuid) {
|
||||
if (StrUtil.isEmpty(uuid)) {
|
||||
return null;
|
||||
}
|
||||
FilterThrProductsRequest filterThrProductsRequest = new FilterThrProductsRequest();
|
||||
filterThrProductsRequest.setUuid(uuid);
|
||||
List<ThrProductsAddDiResponse> thrProductsAddDiResponses = thrProductsAddDiDao.filterThrProductsList(filterThrProductsRequest);
|
||||
if (CollUtil.isNotEmpty(thrProductsAddDiResponses)) {
|
||||
return thrProductsAddDiResponses.get(0);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean delThrDiProducts(Long id) {
|
||||
return thrProductsAddDiDao.deleteById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean updateDiProduct(ThrProductsAddDiEntity thrProductsAddDiEntity) {
|
||||
return thrProductsAddDiDao.updateDiProduct(thrProductsAddDiEntity);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean addThrAddDiProducts(AddThrDiProductsRequest thrDiProductsRequest) {
|
||||
|
||||
List<String> uuids = thrDiProductsRequest.getUuids();
|
||||
Long customerId = thrDiProductsRequest.getCustomerId();
|
||||
List<ThrProductsAddDiEntity> list = new ArrayList<>(uuids.size());
|
||||
Date date = new Date();
|
||||
for (String uuid : uuids) {
|
||||
ProductInfoEntity productInfoEntity = productInfoService.selectByUuid(uuid).get(0);
|
||||
ThrProductsAddDiEntity thrProductsAddDiEntity = new ThrProductsAddDiEntity();
|
||||
BeanUtils.copyProperties(thrDiProductsRequest, thrProductsAddDiEntity);
|
||||
thrProductsAddDiEntity.setCustomerId(customerId + "");
|
||||
thrProductsAddDiEntity.setUuid(uuid);
|
||||
thrProductsAddDiEntity.setType(1);
|
||||
thrProductsAddDiEntity.setYlqxzcrbarywmc(productInfoEntity.getYlqxzcrbarywmc());
|
||||
thrProductsAddDiEntity.setCplb(productInfoEntity.getCplb());
|
||||
thrProductsAddDiEntity.setCpms(productInfoEntity.getCpms());
|
||||
thrProductsAddDiEntity.setFlbm(productInfoEntity.getFlbm());
|
||||
thrProductsAddDiEntity.setQxlb(productInfoEntity.getQxlb());
|
||||
thrProductsAddDiEntity.setTyshxydm(productInfoEntity.getTyshxydm());
|
||||
thrProductsAddDiEntity.setCode(productInfoEntity.getNameCode());
|
||||
thrProductsAddDiEntity.setName(productInfoEntity.getCpmctymc());
|
||||
thrProductsAddDiEntity.setStandard(productInfoEntity.getGgxh());
|
||||
thrProductsAddDiEntity.setSpec(productInfoEntity.getGgxh());
|
||||
thrProductsAddDiEntity.setRegisterNo(productInfoEntity.getZczbhhzbapzbh());
|
||||
thrProductsAddDiEntity.setYlqxzcrbarmc(productInfoEntity.getYlqxzcrbarmc());
|
||||
thrProductsAddDiEntity.setZczbhhzbapzbh(productInfoEntity.getZczbhhzbapzbh());
|
||||
|
||||
//设置编辑区参数
|
||||
thrProductsAddDiEntity.setSptm(thrDiProductsRequest.getSptm());
|
||||
thrProductsAddDiEntity.setYbbm(thrDiProductsRequest.getYbbm());
|
||||
thrProductsAddDiEntity.setMeasname(thrDiProductsRequest.getMeasname());
|
||||
thrProductsAddDiEntity.setManufactory(thrDiProductsRequest.getManufactory());
|
||||
thrProductsAddDiEntity.setSpmc(thrDiProductsRequest.getSpmc());
|
||||
thrProductsAddDiEntity.setCpms(thrDiProductsRequest.getCpms());
|
||||
thrProductsAddDiEntity.setPrice(thrDiProductsRequest.getPrice());
|
||||
|
||||
thrProductsAddDiEntity.setCreateTime(date);
|
||||
thrProductsAddDiEntity.setUpdateTime(new Date());
|
||||
thrProductsAddDiEntity.setStatus(1); //未审核
|
||||
thrProductsAddDiEntity.setSelectThridSysStr(JSONUtil.toJsonStr(thrDiProductsRequest.getSelectThirdSys()));
|
||||
list.add(thrProductsAddDiEntity);
|
||||
}
|
||||
return thrProductsAddDiDao.insertThrDiProducts(list);
|
||||
}
|
||||
|
||||
@Override
|
||||
public UdiInfoResponse getDiProductDetail(String uuid) {
|
||||
ThrProductsAddDiEntity thrProductsAddDiEntity = thrProductsAddDiDao.filterThrProductsGetUuid(uuid);
|
||||
UdiInfoResponse udiInfoResponse = thrProductsAddDiDao.getDiProductDetail(uuid);
|
||||
if(udiInfoResponse!=null){
|
||||
udiInfoResponse.setSptm(thrProductsAddDiEntity.getSptm());
|
||||
udiInfoResponse.setYbbm(thrProductsAddDiEntity.getYbbm());
|
||||
udiInfoResponse.setManufactory(thrProductsAddDiEntity.getManufactory());
|
||||
udiInfoResponse.setCpms(thrProductsAddDiEntity.getCpms());
|
||||
udiInfoResponse.setMeasname(thrProductsAddDiEntity.getMeasname());
|
||||
udiInfoResponse.setManufactory(thrProductsAddDiEntity.getManufactory());
|
||||
udiInfoResponse.setPrice(thrProductsAddDiEntity.getPrice());
|
||||
udiInfoResponse.setBasicPrductRemak1(thrProductsAddDiEntity.getBasicPrductRemak1());
|
||||
udiInfoResponse.setBasicPrductRemak2(thrProductsAddDiEntity.getBasicPrductRemak2());
|
||||
udiInfoResponse.setBasicPrductRemak3(thrProductsAddDiEntity.getBasicPrductRemak3());
|
||||
udiInfoResponse.setBasicPrductRemak4(thrProductsAddDiEntity.getBasicPrductRemak4());
|
||||
udiInfoResponse.setBasicPrductRemak5(thrProductsAddDiEntity.getBasicPrductRemak5());
|
||||
udiInfoResponse.setBasicPrductRemak6(thrProductsAddDiEntity.getBasicPrductRemak6());
|
||||
udiInfoResponse.setBasicPrductRemak7(thrProductsAddDiEntity.getBasicPrductRemak7());
|
||||
udiInfoResponse.setBasicPrductRemak8(thrProductsAddDiEntity.getBasicPrductRemak8());
|
||||
}
|
||||
return udiInfoResponse;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ThrProductsAddDiEntity filterThrProductsGetId(Integer id) {
|
||||
return thrProductsAddDiDao.filterThrProductsGetId(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean insertThrProducts(ThrProductsAddDiEntity thrProductsAddDiEntity) {
|
||||
return thrProductsAddDiDao.insert(thrProductsAddDiEntity);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ThrProductsAddDiResponse> filterThrProductsDiList(FilterThrProductsRequest filterThrProductsRequest) {
|
||||
return thrProductsAddDiDao.filterThrProductsDiList(filterThrProductsRequest);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ThrProductsAddDiEntity> filterThrProductsDiLists(FilterThrProductsRequest filterThrProductsRequest) {
|
||||
return thrProductsAddDiDao.filterThrProductsDiLists(filterThrProductsRequest);
|
||||
}
|
||||
}
|
@ -0,0 +1,175 @@
|
||||
package com.glxp.api.util;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.glxp.api.entity.basic.BasicProductSetEntity;
|
||||
import com.glxp.api.entity.system.SystemParamConfigEntity;
|
||||
import com.glxp.api.req.basic.SupplementRequest;
|
||||
import com.glxp.api.service.basic.BasicProductSetService;
|
||||
import com.glxp.api.service.system.SystemParamConfigService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.Map;
|
||||
|
||||
@Service
|
||||
public class SupplementVailUtil {
|
||||
|
||||
@Resource
|
||||
BasicProductSetService basicProductSetService;
|
||||
@Resource
|
||||
SystemParamConfigService systemParamConfigService;
|
||||
|
||||
|
||||
public static final int SUP_SELECT = 1;
|
||||
public static final int SUP_ADD = 2;
|
||||
public static final int LOCAL_ADD = 3;
|
||||
public static final int LOCAL_EIDT = 4;
|
||||
|
||||
|
||||
public String vail(SupplementRequest supplementRequest, int type) {
|
||||
//验证产品信息是否必填
|
||||
Map<String, BasicProductSetEntity> basicProductSetEntityMap = basicProductSetService.filterAllEnable();
|
||||
Map<String, SystemParamConfigEntity> systemParamConfigEntityMap = systemParamConfigService.findBasicAll();
|
||||
if (basicProductSetEntityMap.size() > 0) {
|
||||
BasicProductSetEntity basicProductSetEntity = null;
|
||||
|
||||
basicProductSetEntity = basicProductSetEntityMap.get("sptm");
|
||||
if (isMustFill(type, basicProductSetEntity)) {
|
||||
if (StrUtil.isEmpty(supplementRequest.getSptm())) {
|
||||
return "商品条码不能为空";
|
||||
}
|
||||
}
|
||||
basicProductSetEntity = basicProductSetEntityMap.get("ybbm");
|
||||
if (isMustFill(type, basicProductSetEntity)) {
|
||||
if (StrUtil.isEmpty(supplementRequest.getYbbm())) {
|
||||
return "医保编码不能为空";
|
||||
}
|
||||
}
|
||||
basicProductSetEntity = basicProductSetEntityMap.get("measname");
|
||||
if (isMustFill(type, basicProductSetEntity)) {
|
||||
if (StrUtil.isEmptyIfStr(supplementRequest.getMeasname())) {
|
||||
return "计量单位不能为空";
|
||||
}
|
||||
}
|
||||
basicProductSetEntity = basicProductSetEntityMap.get("manufactory");
|
||||
if (isMustFill(type, basicProductSetEntity)) {
|
||||
if (StrUtil.isEmptyIfStr(supplementRequest.getManufactory())) {
|
||||
return "生产厂家不能为空";
|
||||
}
|
||||
}
|
||||
|
||||
basicProductSetEntity = basicProductSetEntityMap.get("spmc");
|
||||
if (isMustFill(type, basicProductSetEntity)) {
|
||||
if (StrUtil.isEmptyIfStr(supplementRequest.getSpmc())) {
|
||||
return "商品名称不能为空";
|
||||
}
|
||||
}
|
||||
|
||||
basicProductSetEntity = basicProductSetEntityMap.get("cpms");
|
||||
if (isMustFill(type, basicProductSetEntity)) {
|
||||
if (StrUtil.isEmptyIfStr(supplementRequest.getCpms())) {
|
||||
return "产品描述不能为空";
|
||||
}
|
||||
}
|
||||
basicProductSetEntity = basicProductSetEntityMap.get("price");
|
||||
if (isMustFill(type, basicProductSetEntity)) {
|
||||
if (StrUtil.isEmptyIfStr(supplementRequest.getPrice())) {
|
||||
return "产品价格不能为空";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
basicProductSetEntity = basicProductSetEntityMap.get("basicPrductRemak1");
|
||||
if (isMustFill(type, basicProductSetEntity)) {
|
||||
if (StrUtil.isEmpty(supplementRequest.getBasicPrductRemak1())) {
|
||||
SystemParamConfigEntity systemParamConfigEntity = systemParamConfigEntityMap.get("basicPrductRemak1");
|
||||
if (!systemParamConfigEntity.getParamValue().equals("0")) {
|
||||
return systemParamConfigEntity.getParamValue() + "不能为空";
|
||||
}
|
||||
}
|
||||
}
|
||||
basicProductSetEntity = basicProductSetEntityMap.get("basicPrductRemak2");
|
||||
if (isMustFill(type, basicProductSetEntity)) {
|
||||
if (StrUtil.isEmpty(supplementRequest.getBasicPrductRemak2())) {
|
||||
SystemParamConfigEntity systemParamConfigEntity = systemParamConfigEntityMap.get("basicPrductRemak2");
|
||||
if (!systemParamConfigEntity.getParamValue().equals("0")) {
|
||||
return systemParamConfigEntity.getParamValue() + "不能为空";
|
||||
}
|
||||
}
|
||||
}
|
||||
basicProductSetEntity = basicProductSetEntityMap.get("basicPrductRemak3");
|
||||
if (isMustFill(type, basicProductSetEntity)) {
|
||||
if (StrUtil.isEmpty(supplementRequest.getBasicPrductRemak3())) {
|
||||
SystemParamConfigEntity systemParamConfigEntity = systemParamConfigEntityMap.get("basicPrductRemak3");
|
||||
if (!systemParamConfigEntity.getParamValue().equals("0")) {
|
||||
return systemParamConfigEntity.getParamValue() + "不能为空";
|
||||
}
|
||||
}
|
||||
}
|
||||
basicProductSetEntity = basicProductSetEntityMap.get("basicPrductRemak4");
|
||||
if (isMustFill(type, basicProductSetEntity)) {
|
||||
if (StrUtil.isEmpty(supplementRequest.getBasicPrductRemak4())) {
|
||||
SystemParamConfigEntity systemParamConfigEntity = systemParamConfigEntityMap.get("basicPrductRemak4");
|
||||
if (!systemParamConfigEntity.getParamValue().equals("0")) {
|
||||
return systemParamConfigEntity.getParamValue() + "不能为空";
|
||||
}
|
||||
}
|
||||
}
|
||||
basicProductSetEntity = basicProductSetEntityMap.get("basicPrductRemak5");
|
||||
if (isMustFill(type, basicProductSetEntity)) {
|
||||
if (StrUtil.isEmpty(supplementRequest.getBasicPrductRemak5())) {
|
||||
SystemParamConfigEntity systemParamConfigEntity = systemParamConfigEntityMap.get("basicPrductRemak5");
|
||||
if (!systemParamConfigEntity.getParamValue().equals("0")) {
|
||||
return systemParamConfigEntity.getParamValue() + "不能为空";
|
||||
}
|
||||
}
|
||||
}
|
||||
basicProductSetEntity = basicProductSetEntityMap.get("basicPrductRemak6");
|
||||
if (isMustFill(type, basicProductSetEntity)) {
|
||||
if (StrUtil.isEmpty(supplementRequest.getBasicPrductRemak6())) {
|
||||
SystemParamConfigEntity systemParamConfigEntity = systemParamConfigEntityMap.get("basicPrductRemak6");
|
||||
if (!systemParamConfigEntity.getParamValue().equals("0")) {
|
||||
return systemParamConfigEntity.getParamValue() + "不能为空";
|
||||
}
|
||||
}
|
||||
}
|
||||
basicProductSetEntity = basicProductSetEntityMap.get("basicPrductRemak7");
|
||||
if (isMustFill(type, basicProductSetEntity)) {
|
||||
if (StrUtil.isEmpty(supplementRequest.getBasicPrductRemak7())) {
|
||||
SystemParamConfigEntity systemParamConfigEntity = systemParamConfigEntityMap.get("basicPrductRemak7");
|
||||
if (!systemParamConfigEntity.getParamValue().equals("0")) {
|
||||
return systemParamConfigEntity.getParamValue() + "不能为空";
|
||||
}
|
||||
}
|
||||
}
|
||||
basicProductSetEntity = basicProductSetEntityMap.get("basicPrductRemak8");
|
||||
if (isMustFill(type, basicProductSetEntity)) {
|
||||
if (StrUtil.isEmpty(supplementRequest.getBasicPrductRemak8())) {
|
||||
SystemParamConfigEntity systemParamConfigEntity = systemParamConfigEntityMap.get("basicPrductRemak8");
|
||||
if (!systemParamConfigEntity.getParamValue().equals("0")) {
|
||||
return systemParamConfigEntity.getParamValue() + "不能为空";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
public boolean isMustFill(int type, BasicProductSetEntity basicProductSetEntity) {
|
||||
if (basicProductSetEntity == null)
|
||||
return false;
|
||||
if (type == SUP_SELECT && basicProductSetEntity.isSupSelect()) {
|
||||
return true;
|
||||
} else if (type == SUP_ADD && basicProductSetEntity.isSupAdd()) {
|
||||
return true;
|
||||
} else if (type == LOCAL_ADD && basicProductSetEntity.isLocalAdd()) {
|
||||
return true;
|
||||
} else if (type == LOCAL_EIDT && basicProductSetEntity.isLocalEdit()) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,42 @@
|
||||
<?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.basic.BasicProductSetDao">
|
||||
|
||||
|
||||
<select id="filterSetup"
|
||||
parameterType="com.glxp.api.req.basic.FilterBasicProductSetrequest"
|
||||
resultType="com.glxp.api.entity.basic.BasicProductSetEntity">
|
||||
SELECT *
|
||||
FROM basic_product_set
|
||||
<where>
|
||||
<if test="parmName != '' and parmName!=null">
|
||||
and udiRlIdFk = #{udiRlIdFk}
|
||||
</if>
|
||||
<if test="enable != null ">
|
||||
and enable = #{enable}
|
||||
</if>
|
||||
</where>
|
||||
ORDER BY sort
|
||||
</select>
|
||||
|
||||
|
||||
<insert id="updateSetup" parameterType="com.glxp.api.entity.basic.BasicProductSetEntity">
|
||||
replace
|
||||
INTO basic_product_set(parmName,
|
||||
parmKey,enable,supSelect,supAdd,localAdd,remark,sort,localEdit) values
|
||||
(
|
||||
#{parmName},
|
||||
#{parmKey},
|
||||
#{enable} ,
|
||||
#{supSelect},
|
||||
#{supAdd},
|
||||
#{localAdd},
|
||||
#{remark},
|
||||
#{sort},
|
||||
#{localEdit}
|
||||
)
|
||||
</insert>
|
||||
|
||||
|
||||
</mapper>
|
@ -0,0 +1,226 @@
|
||||
<?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.basic.CompanyProductRelevanceDao">
|
||||
<insert id="insertCompanyProductRelevance"
|
||||
parameterType="com.glxp.api.entity.basic.CompanyProductRelevanceEntity">
|
||||
replace
|
||||
INTO company_product_relevance(customerId, productId, enterpriseId, registrationId,
|
||||
createTime, updateTime, auditStatus, productUuid, udiRlIdFk, unitFk,
|
||||
price)
|
||||
values (#{customerId},
|
||||
#{productId},
|
||||
#{enterpriseId},
|
||||
#{registrationId},
|
||||
#{createTime},
|
||||
#{updateTime},
|
||||
#{auditStatus},
|
||||
#{productUuid},
|
||||
#{udiRlIdFk},
|
||||
#{unitFk}, #{price})
|
||||
</insert>
|
||||
|
||||
|
||||
<insert id="importCompanyProductRelevance"
|
||||
parameterType="com.glxp.api.entity.basic.CompanyProductRelevanceEntity">
|
||||
replace
|
||||
INTO company_product_relevance(id, customerId, productId, enterpriseId, registrationId,
|
||||
create_time, update_time, auditStatus, productUuid, udiRlIdFk, unitFk,
|
||||
price)
|
||||
values (#{id},
|
||||
#{customerId},
|
||||
#{productId},
|
||||
#{enterpriseId},
|
||||
#{registrationId},
|
||||
#{create_time},
|
||||
#{update_time},
|
||||
#{auditStatus},
|
||||
#{productUuid},
|
||||
#{udiRlIdFk},
|
||||
#{unitFk}, #{price})
|
||||
</insert>
|
||||
|
||||
<delete id="deleteById" parameterType="Map">
|
||||
DELETE
|
||||
FROM company_product_relevance
|
||||
WHERE id = #{id}
|
||||
</delete>
|
||||
|
||||
|
||||
<delete id="deleteByRlId" parameterType="Map">
|
||||
DELETE
|
||||
FROM company_product_relevance
|
||||
WHERE udiRlIdFk = #{id}
|
||||
</delete>
|
||||
|
||||
<select id="filterUdiGp" parameterType="com.glxp.api.req.basic.CompanyProductRelevanceRequest"
|
||||
resultType="com.glxp.api.res.basic.CompanyProductRelevanceResponse">
|
||||
SELECT company_product_relevance.id,
|
||||
company_product_relevance.customerId,
|
||||
company_product_relevance.auditStatus,
|
||||
basic_udirel.thirdId,
|
||||
basic_udirel.id rlId,
|
||||
basic_udirel.isUseDy,
|
||||
basic_udirel.isLock,
|
||||
basic_udirel.thirdId1,
|
||||
basic_udirel.thirdId2,
|
||||
basic_udirel.thirdId3,
|
||||
basic_udirel.thirdId4,
|
||||
basic_udirel.lockStatus,
|
||||
basic_products.allowNoBatch,
|
||||
basic_products.allowNoExpire,
|
||||
basic_products.allowNoProduct,
|
||||
basic_products.allowNoSerial,
|
||||
basic_products.productType,
|
||||
basic_products.nameCode,
|
||||
basic_products.packRatio,
|
||||
basic_products.packLevel,
|
||||
basic_products.bhxjsl,
|
||||
basic_products.bhzxxsbzsl,
|
||||
basic_products.zxxsbzbhsydysl,
|
||||
basic_products.bhxjcpbm,
|
||||
basic_products.bzcj,
|
||||
basic_udirel.isDisable,
|
||||
basic_products.deviceRecordKey,
|
||||
basic_products.cpmctymc,
|
||||
basic_products.cplb,
|
||||
basic_products.flbm,
|
||||
basic_products.ggxh,
|
||||
basic_products.qxlb,
|
||||
basic_products.tyshxydm,
|
||||
basic_products.ylqxzcrbarmc,
|
||||
basic_products.zczbhhzbapzbh,
|
||||
basic_products.ylqxzcrbarywmc,
|
||||
basic_products.sydycpbs,
|
||||
basic_products.uuid,
|
||||
basic_products.sjcpbm,
|
||||
basic_products.versionNumber,
|
||||
basic_products.diType,
|
||||
customer_info.companyName,
|
||||
basic_udirel.mainId,
|
||||
basic_udirel.isAdavence,
|
||||
basic_products.scbssfbhph,
|
||||
basic_products.scbssfbhxlh,
|
||||
basic_products.scbssfbhscrq,
|
||||
basic_products.cpdls,
|
||||
basic_products.scbssfbhsxrq,
|
||||
basic_products.cpms,
|
||||
basic_products.originUuid,
|
||||
company_product_relevance.price,
|
||||
basic_products.spmc,
|
||||
basic_products.basicPrductRemak1,
|
||||
basic_products.basicPrductRemak2,
|
||||
basic_products.basicPrductRemak3,
|
||||
basic_products.basicPrductRemak4,
|
||||
basic_products.basicPrductRemak5,
|
||||
basic_products.basicPrductRemak6,
|
||||
basic_products.basicPrductRemak7,
|
||||
basic_products.basicPrductRemak8
|
||||
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 customer_info ON customer_info.customerId = company_product_relevance.customerId
|
||||
<where>
|
||||
<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="ggxh != '' and ggxh != null">
|
||||
AND ggxh LIKE concat('%', #{ggxh}, '%')
|
||||
</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}, '%')
|
||||
)
|
||||
</if>
|
||||
<if test="thrPiId != '' and thrPiId != null">
|
||||
and (
|
||||
thirdId LIKE concat('%', #{thrPiId}, '%')
|
||||
or thirdId1 LIKE concat('%', #{thrPiId}, '%')
|
||||
or thirdId2 LIKE concat('%', #{thrPiId}, '%')
|
||||
or thirdId3 LIKE concat('%', #{thrPiId}, '%')
|
||||
or thirdId4 LIKE concat('%', #{thrPiId}, '%')
|
||||
)
|
||||
</if>
|
||||
<if test="uuid != '' and uuid != null">
|
||||
AND basic_udirel.uuid = #{uuid}
|
||||
</if>
|
||||
<if test="thirdId != '' and thirdId != null">
|
||||
AND thirdId = #{thirdId}
|
||||
</if>
|
||||
<if test="zczbhhzbapzbh != '' and zczbhhzbapzbh != null">
|
||||
AND zczbhhzbapzbh LIKE concat(#{zczbhhzbapzbh}, '%')
|
||||
</if>
|
||||
<if test="diType != '' and diType != null">
|
||||
AND diType = #{diType}
|
||||
</if>
|
||||
<if test="filterType != null and filterType == 1">
|
||||
AND (thirdId <![CDATA[<>]]> '' or thirdId1 <![CDATA[<>]]> '' or thirdId2 <![CDATA[<>]]> '' or
|
||||
thirdId3 <![CDATA[<>]]> '' or thirdId4 <![CDATA[<>]]> '')
|
||||
and basic_products.originUuid <![CDATA[<>]]> ''
|
||||
</if>
|
||||
<if test="filterType != null and filterType == 2">
|
||||
AND basic_products.originUuid is NULL
|
||||
</if>
|
||||
<if test="filterType != null and filterType == 3">
|
||||
AND mainId is NULL
|
||||
and basic_products.originUuid <![CDATA[<>]]> ''
|
||||
</if>
|
||||
<if test="filterType != null and filterType == 4">
|
||||
AND thirdId1 is NULL
|
||||
and basic_products.flbm <![CDATA[<>]]> ''
|
||||
</if>
|
||||
<if test="filterType != null and filterType == 5">
|
||||
AND thirdId2 is NULL
|
||||
and basic_products.flbm <![CDATA[<>]]> ''
|
||||
</if>
|
||||
<if test="filterType != null and filterType == 6">
|
||||
AND thirdId3 is NULL
|
||||
and basic_products.flbm <![CDATA[<>]]> ''
|
||||
</if>
|
||||
<if test="filterType != null and filterType == 7">
|
||||
AND thirdId4 is NULL
|
||||
and basic_products.flbm <![CDATA[<>]]> ''
|
||||
</if>
|
||||
<if test="filterType != null and filterType == 10">
|
||||
AND basic_udirel.updateTime is NULL
|
||||
</if>
|
||||
|
||||
<if test="customerId != '' and customerId != null">
|
||||
AND company_product_relevance.customerId = #{customerId}
|
||||
</if>
|
||||
<if test="auditStatus != '' and auditStatus != null">
|
||||
AND company_product_relevance.auditStatus = #{auditStatus}
|
||||
</if>
|
||||
<if test="id != '' and id != null">
|
||||
AND basic_udirel.id = #{id}
|
||||
</if>
|
||||
<if test="companyName != '' and companyName != null">
|
||||
AND customer_info.companyName = #{companyName}
|
||||
</if>
|
||||
<if test="lockStatus != '' and lockStatus != null">
|
||||
AND basic_udirel.lockStatus = #{lockStatus}
|
||||
</if>
|
||||
<if test="isAdavence != '' and isAdavence != null">
|
||||
AND basic_udirel.isAdavence = #{isAdavence}
|
||||
</if>
|
||||
<if test="unitFk != null and unitFk != ''">
|
||||
and unitFk = #{unitFk}
|
||||
</if>
|
||||
<if test="originUuid != null and originUuid != ''">
|
||||
and originUuid = #{originUuid}
|
||||
</if>
|
||||
<if test="isDisable == false">
|
||||
AND (basic_udirel.isDisable is null or basic_udirel.isDisable = false)
|
||||
</if>
|
||||
</where>
|
||||
ORDER BY company_product_relevance.updateTime DESC
|
||||
</select>
|
||||
</mapper>
|
File diff suppressed because it is too large
Load Diff
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue