同步代码
parent
e68440a7b8
commit
1f66bdec10
@ -0,0 +1,45 @@
|
||||
package com.glxp.api.controller.basic;
|
||||
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import com.glxp.api.annotation.AuthRuleAnnotation;
|
||||
import com.glxp.api.common.res.BaseResponse;
|
||||
import com.glxp.api.common.util.ResultVOUtils;
|
||||
import com.glxp.api.entity.basic.BasicProductSetEntity;
|
||||
import com.glxp.api.req.basic.FilterBasicProductSetrequest;
|
||||
import com.glxp.api.res.PageSimpleResponse;
|
||||
import com.glxp.api.service.basic.BasicProductSetService;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
@RestController
|
||||
public class BasicProductSetController {
|
||||
|
||||
@Resource
|
||||
BasicProductSetService basicProductSetService;
|
||||
|
||||
|
||||
@AuthRuleAnnotation("")
|
||||
@GetMapping("/spms/basicProduct/setup/filter")
|
||||
public BaseResponse filterSetUps(FilterBasicProductSetrequest filterBasicProductSetrequest) {
|
||||
List<BasicProductSetEntity> basicProductSetEntities = basicProductSetService.filterSetup(filterBasicProductSetrequest);
|
||||
PageInfo<BasicProductSetEntity> pageInfo;
|
||||
pageInfo = new PageInfo<>(basicProductSetEntities);
|
||||
PageSimpleResponse<BasicProductSetEntity> pageSimpleResponse = new PageSimpleResponse<>();
|
||||
pageSimpleResponse.setTotal(pageInfo.getTotal());
|
||||
pageSimpleResponse.setList(basicProductSetEntities);
|
||||
return ResultVOUtils.success(pageSimpleResponse);
|
||||
}
|
||||
|
||||
@AuthRuleAnnotation("")
|
||||
@PostMapping("/spms/basicProduct/setup/modify")
|
||||
public BaseResponse modifySetup(@RequestBody BasicProductSetEntity basicProductSetEntity) {
|
||||
basicProductSetService.updateSetup(basicProductSetEntity);
|
||||
return ResultVOUtils.success("修改成功");
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,202 @@
|
||||
package com.glxp.api.controller.thrsys;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import com.glxp.api.annotation.AuthRuleAnnotation;
|
||||
import com.glxp.api.common.enums.ResultEnum;
|
||||
import com.glxp.api.common.res.BaseResponse;
|
||||
import com.glxp.api.common.util.ResultVOUtils;
|
||||
import com.glxp.api.entity.auth.AuthAdmin;
|
||||
import com.glxp.api.entity.basic.UdiRelevanceEntity;
|
||||
import com.glxp.api.entity.thrsys.ThrProductsAddEntity;
|
||||
import com.glxp.api.entity.thrsys.ThrProductsEntity;
|
||||
import com.glxp.api.exception.JsonException;
|
||||
import com.glxp.api.req.system.DeleteRequest;
|
||||
import com.glxp.api.req.thrsys.FilterThrProductsRequest;
|
||||
import com.glxp.api.res.PageSimpleResponse;
|
||||
import com.glxp.api.res.basic.UdiRelevanceResponse;
|
||||
import com.glxp.api.service.auth.AuthAdminService;
|
||||
import com.glxp.api.service.auth.CustomerService;
|
||||
import com.glxp.api.service.basic.UdiRelevanceService;
|
||||
import com.glxp.api.service.thrsys.ThrProductsAddService;
|
||||
import com.glxp.api.service.thrsys.ThrProductsService;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.validation.BindingResult;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import org.springframework.web.context.request.RequestContextHolder;
|
||||
import org.springframework.web.context.request.ServletRequestAttributes;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
@RestController
|
||||
public class ThrProductsAddController {
|
||||
@Resource
|
||||
private ThrProductsAddService thrProductsAddService;
|
||||
@Resource
|
||||
private ThrProductsService thrProductsService;
|
||||
@Resource
|
||||
private CustomerService customerService;
|
||||
@Resource
|
||||
AuthAdminService authAdminService;
|
||||
|
||||
@AuthRuleAnnotation("")
|
||||
@GetMapping("/udiwms/thrsys/getThrAddProducts")
|
||||
public BaseResponse getThrProducts(FilterThrProductsRequest filterThrProductsRequest,
|
||||
BindingResult bindingResult) {
|
||||
|
||||
if (bindingResult.hasErrors()) {
|
||||
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, bindingResult.getFieldError().getDefaultMessage());
|
||||
}
|
||||
String customerId = getCustomerId();
|
||||
if (!customerId.equals("110")) {
|
||||
filterThrProductsRequest.setCustomerId(customerId + "");
|
||||
} else {
|
||||
filterThrProductsRequest.setCustomerId(filterThrProductsRequest.getSupId());
|
||||
}
|
||||
List<ThrProductsAddEntity> thrProductsAddEntities
|
||||
= thrProductsAddService.filterThrProductsRequest(filterThrProductsRequest);
|
||||
PageInfo<ThrProductsAddEntity> pageInfo;
|
||||
pageInfo = new PageInfo<>(thrProductsAddEntities);
|
||||
PageSimpleResponse<ThrProductsAddEntity> pageSimpleResponse = new PageSimpleResponse<>();
|
||||
pageSimpleResponse.setTotal(pageInfo.getTotal());
|
||||
pageSimpleResponse.setList(thrProductsAddEntities);
|
||||
return ResultVOUtils.success(pageSimpleResponse);
|
||||
}
|
||||
|
||||
public String getCustomerId() {
|
||||
ServletRequestAttributes attributes = (ServletRequestAttributes) RequestContextHolder.getRequestAttributes();
|
||||
if (attributes == null) {
|
||||
throw new JsonException(ResultEnum.NOT_NETWORK);
|
||||
}
|
||||
HttpServletRequest request = attributes.getRequest();
|
||||
String userId = request.getHeader("ADMIN_ID");
|
||||
AuthAdmin authAdmin = authAdminService.findById(Long.parseLong(userId));
|
||||
return authAdmin.getCustomerId() + "";
|
||||
}
|
||||
@AuthRuleAnnotation("")
|
||||
@PostMapping("/udiwms/thrsys/delThrAddProducts")
|
||||
public BaseResponse delThrProducts(@RequestBody DeleteRequest deleteRequest, BindingResult bindingResult) {
|
||||
|
||||
if (bindingResult.hasErrors()) {
|
||||
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, bindingResult.getFieldError().getDefaultMessage());
|
||||
}
|
||||
String id = deleteRequest.getId();
|
||||
thrProductsAddService.deleteById(id);
|
||||
return ResultVOUtils.success("删除成功");
|
||||
}
|
||||
|
||||
|
||||
@AuthRuleAnnotation("")
|
||||
@PostMapping("/udiwms/thrsys/updateThrAddProducts")
|
||||
public BaseResponse updateThrAddProducts(@RequestBody ThrProductsAddEntity thrProductsAddEntity, BindingResult bindingResult) {
|
||||
|
||||
if (bindingResult.hasErrors()) {
|
||||
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, bindingResult.getFieldError().getDefaultMessage());
|
||||
}
|
||||
|
||||
ThrProductsAddEntity tempEntity = thrProductsAddService.selectById(thrProductsAddEntity.getId() + "");
|
||||
// if (thrProductsService.isExit(tempEntity.getCode(), tempEntity.getThirdSysFk())) {
|
||||
// return ResultVOUtils.error(500, "已存在相同产品编码,无法添加!");
|
||||
// }
|
||||
thrProductsAddService.updateThrProducts(thrProductsAddEntity);
|
||||
if (thrProductsAddEntity.getCheckStatus() == 2) {
|
||||
ThrProductsEntity thrProductsEntity = new ThrProductsEntity();
|
||||
thrProductsAddEntity = thrProductsAddService.selectById(thrProductsAddEntity.getId() + "");
|
||||
BeanUtils.copyProperties(thrProductsAddEntity, thrProductsEntity);
|
||||
thrProductsEntity.setUpdateTime(new Date());
|
||||
thrProductsService.insertThrProducts(thrProductsEntity);
|
||||
|
||||
if (StrUtil.isNotEmpty(tempEntity.getRelId())) {
|
||||
UdiRelevanceEntity udiRelevanceEntity = udiRelevanceService.selectById(Long.valueOf(tempEntity.getRelId()));
|
||||
if (udiRelevanceEntity != null) {
|
||||
if (tempEntity.getThirdSysFk().equals("thirdId")) {
|
||||
udiRelevanceEntity.setMainId(tempEntity.getCode());
|
||||
udiRelevanceEntity.setThirdId(tempEntity.getCode());
|
||||
} else if (tempEntity.getThirdSysFk().equals("thirdId1")) {
|
||||
udiRelevanceEntity.setThirdId1(tempEntity.getCode());
|
||||
} else if (tempEntity.getThirdSysFk().equals("thirdId2")) {
|
||||
udiRelevanceEntity.setThirdId2(tempEntity.getCode());
|
||||
} else if (tempEntity.getThirdSysFk().equals("thirdId3")) {
|
||||
udiRelevanceEntity.setThirdId3(tempEntity.getCode());
|
||||
} else if (tempEntity.getThirdSysFk().equals("thirdId4")) {
|
||||
udiRelevanceEntity.setThirdId4(tempEntity.getCode());
|
||||
}
|
||||
}
|
||||
|
||||
udiRelevanceEntity.setUpdateTime(new Date());
|
||||
udiRelevanceEntity.setModifyTime(new Date());
|
||||
UdiRelevanceEntity udiRelevanceEntity1=new UdiRelevanceEntity();
|
||||
BeanUtils.copyProperties(udiRelevanceEntity,udiRelevanceEntity1);
|
||||
udiRelevanceService.updateUdiRelevance(udiRelevanceEntity1);
|
||||
}
|
||||
|
||||
|
||||
//审核通过后直接加到耗材字典里---todo 暂时不加到耗材字典里
|
||||
// BasicThirdSysEntity basicThirdSysEntity = basicThirdSysService.selectMainThrSys();
|
||||
// if (basicThirdSysEntity.getThirdId().equals(thrProductsAddEntity.getThirdSysFk()))
|
||||
// if (!udiContrastService.isExit(null, thrProductsAddEntity.getCode(), null)) {
|
||||
// udiContrastService.createOnlyMainId(thrProductsAddEntity.getCode());
|
||||
// }
|
||||
} else if (thrProductsAddEntity.getCheckStatus().equals(3)) {
|
||||
//不通过,删除第三方产品信息表中此产品数据
|
||||
thrProductsService.deleteById(thrProductsAddEntity.getId().toString());
|
||||
}
|
||||
return ResultVOUtils.success(ResultEnum.SUCCESS);
|
||||
}
|
||||
|
||||
|
||||
@Resource
|
||||
UdiRelevanceService udiRelevanceService;
|
||||
|
||||
/**
|
||||
* 新增第三方产品信息
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@AuthRuleAnnotation("")
|
||||
@PostMapping("/udiwms/thrsys/addThrAddProducts")
|
||||
public BaseResponse saveProduct(@RequestBody ThrProductsAddEntity thrProductsAddEntity) {
|
||||
if (null == thrProductsAddEntity)
|
||||
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL);
|
||||
|
||||
if (thrProductsService.isExit(thrProductsAddEntity.getCode(), thrProductsAddEntity.getThirdSysFk())) {
|
||||
return ResultVOUtils.error(500, "已存在相同产品编码,无法添加!");
|
||||
}
|
||||
|
||||
|
||||
String customerId = getCustomerId() + "";
|
||||
if (customerId.equals("110")) {
|
||||
ThrProductsEntity thrProductsEntity = new ThrProductsEntity();
|
||||
BeanUtils.copyProperties(thrProductsAddEntity, thrProductsEntity);
|
||||
thrProductsService.insertThrProducts(thrProductsEntity);
|
||||
|
||||
} else {
|
||||
if (StrUtil.isEmpty(thrProductsAddEntity.getThirdSysFk())) {
|
||||
thrProductsAddEntity.setThirdSysFk("thirdId");
|
||||
}
|
||||
if (StrUtil.isNotEmpty(thrProductsAddEntity.getRelId())) {
|
||||
UdiRelevanceResponse udiRelevanceResponse = udiRelevanceService.selectGroupById(Long.valueOf(thrProductsAddEntity.getRelId()));
|
||||
if (udiRelevanceResponse != null) {
|
||||
BeanUtils.copyProperties(udiRelevanceResponse, thrProductsAddEntity);
|
||||
thrProductsAddEntity.setName(udiRelevanceResponse.getCpmctymc());
|
||||
thrProductsAddEntity.setManufactory(udiRelevanceResponse.getYlqxzcrbarmc());
|
||||
thrProductsAddEntity.setSpec(udiRelevanceResponse.getGgxh());
|
||||
thrProductsAddEntity.setRegisterNo(udiRelevanceResponse.getZczbhhzbapzbh());
|
||||
}
|
||||
}
|
||||
thrProductsAddEntity.setCustomerId(customerId);
|
||||
thrProductsAddEntity.setCheckStatus(1);
|
||||
thrProductsAddEntity.setUpdateTime(new Date());
|
||||
thrProductsAddService.insertThrProducts(thrProductsAddEntity);
|
||||
}
|
||||
|
||||
return ResultVOUtils.success();
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,21 @@
|
||||
package com.glxp.api.dao.basic;
|
||||
|
||||
|
||||
import com.glxp.api.entity.basic.BasicNewUploadDiEntity;
|
||||
import com.glxp.api.req.basic.FilterBasicNewUploadDiRequest;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Mapper
|
||||
public interface BasicNewUploadDiDao {
|
||||
|
||||
List<BasicNewUploadDiEntity> filterNewUploads(FilterBasicNewUploadDiRequest filterNewUploadDiRequest);
|
||||
|
||||
boolean deleteById(Integer id);
|
||||
|
||||
boolean insertNewUploadDi(BasicNewUploadDiEntity newUploadDiEntity);
|
||||
|
||||
boolean updateNewUploadDi(BasicNewUploadDiEntity newUploadDiEntity);
|
||||
|
||||
}
|
@ -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,23 @@
|
||||
package com.glxp.api.dao.basic;
|
||||
|
||||
|
||||
import com.glxp.api.entity.basic.CompanyProductRelevanceEntity;
|
||||
import com.glxp.api.req.basic.CompanyProductRelevanceRequest;
|
||||
import com.glxp.api.res.basic.CompanyProductRelevanceResponse;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Mapper
|
||||
public interface CompanyProductRelevanceDao {
|
||||
|
||||
List<CompanyProductRelevanceResponse> filterUdiGp(CompanyProductRelevanceRequest basicInstrumentMaintainRequest);
|
||||
|
||||
boolean insertCompanyProductRelevance(CompanyProductRelevanceEntity companyCertEntity);
|
||||
|
||||
boolean importCompanyProductRelevance(CompanyProductRelevanceEntity companyProductRelevanceEntity);
|
||||
|
||||
boolean deleteById(String id);
|
||||
|
||||
boolean deleteByRlId(String id);
|
||||
}
|
@ -0,0 +1,32 @@
|
||||
package com.glxp.api.dao.thrsys;
|
||||
|
||||
|
||||
import com.glxp.api.entity.thrsys.ThrProductsAddEntity;
|
||||
import com.glxp.api.req.thrsys.FilterThrProductsRequest;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Mapper
|
||||
public interface ThrProductsAddDao {
|
||||
|
||||
List<ThrProductsAddEntity> filterThrProductsRequest(FilterThrProductsRequest filterThrProductsRequest);
|
||||
|
||||
List<ThrProductsAddEntity> batchSelectByIds(FilterThrProductsRequest filterThrProductsRequest);
|
||||
|
||||
ThrProductsAddEntity selectById(@Param("id") String id);
|
||||
|
||||
List<ThrProductsAddEntity> selectThrProducts(FilterThrProductsRequest filterThrProductsRequest);
|
||||
|
||||
boolean insertThrProducts(ThrProductsAddEntity thrProductsEntity);
|
||||
|
||||
boolean insertThrProductss(@Param("thrProductsEntities") List<ThrProductsAddEntity> thrProductsEntities);
|
||||
|
||||
boolean updateThrProducts(ThrProductsAddEntity thrProductsEntity);
|
||||
|
||||
boolean deleteById(@Param("id") String id);
|
||||
|
||||
boolean deleteAll();
|
||||
|
||||
}
|
@ -0,0 +1,41 @@
|
||||
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);
|
||||
}
|
@ -0,0 +1,19 @@
|
||||
package com.glxp.api.entity.basic;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
public class BasicNewUploadDiEntity {
|
||||
private Integer id;
|
||||
private String relId;
|
||||
private String thirdSysFk;
|
||||
private Integer uploadStatus;
|
||||
private String uploadMsg;
|
||||
private String uploadCode;
|
||||
private String remark;
|
||||
private Date updateTime;
|
||||
private Date submitTime;
|
||||
|
||||
}
|
@ -0,0 +1,22 @@
|
||||
package com.glxp.api.entity.basic;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class BasicProductSetEntity {
|
||||
|
||||
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,71 @@
|
||||
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;
|
||||
|
||||
}
|
@ -0,0 +1,48 @@
|
||||
package com.glxp.api.entity.thrsys;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
public class ThrProductsAddEntity {
|
||||
|
||||
private Integer id;
|
||||
private String code;
|
||||
private String name;
|
||||
private String measname;
|
||||
private String spec;
|
||||
private String registerNo;
|
||||
private String manufactory;
|
||||
private String thirdSysFk;
|
||||
private String thirdName;
|
||||
private String cplb;
|
||||
private String flbm;
|
||||
private String qxlb;
|
||||
private String ybbm;
|
||||
private String sptm;
|
||||
private String tyshxydm;
|
||||
private String zczbhhzbapzbh;
|
||||
private String ylqxzcrbarmc;
|
||||
private String ylqxzcrbarywmc;
|
||||
private String cpms;
|
||||
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 String remark; //备注
|
||||
private String remark1; //备注1
|
||||
private String remark2; //备注2
|
||||
private String remark3; //备注3
|
||||
private String price;
|
||||
private Integer checkStatus;
|
||||
private String customerId;
|
||||
private String thirdSys;
|
||||
private String relId;
|
||||
}
|
@ -0,0 +1,16 @@
|
||||
package com.glxp.api.req.basic;
|
||||
|
||||
|
||||
import com.glxp.api.util.page.ListPageRequest;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class FilterBasicNewUploadDiRequest extends ListPageRequest {
|
||||
|
||||
private Integer id;
|
||||
private String relId;
|
||||
private String thirdSysFk;
|
||||
private String uploadStatus;
|
||||
private String uploadCode;
|
||||
private String lastUpdateTime;
|
||||
}
|
@ -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,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,85 @@
|
||||
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 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,41 @@
|
||||
package com.glxp.api.res.basic;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class ErpProductsResponse {
|
||||
|
||||
private String code; //产品编码
|
||||
private String name;
|
||||
private String measname; //计量单位
|
||||
private String spec; //规格型号
|
||||
private String registerNo; //注册证号
|
||||
private String manufactory; //生产厂家
|
||||
private String cplb;
|
||||
private String flbm;
|
||||
private String qxlb;
|
||||
private String ybbm;
|
||||
private String sptm;
|
||||
private String tyshxydm;
|
||||
private String zczbhhzbapzbh;
|
||||
private String ylqxzcrbarmc;
|
||||
private String ylqxzcrbarywmc;
|
||||
private String cpms;
|
||||
private String supName;
|
||||
|
||||
|
||||
//辅助字段
|
||||
private boolean isChecked;
|
||||
private String thirdSys;
|
||||
|
||||
//添加字段
|
||||
private String model; //型号
|
||||
private String standard; //规格型号,二合一字段
|
||||
private String qtbm; //其他编码
|
||||
private String zczyxqz; //注册有效期截止时间
|
||||
private String remark; //备注
|
||||
private String remark1; //备注1
|
||||
private String remark2; //备注2
|
||||
private String remark3; //备注3
|
||||
|
||||
}
|
@ -0,0 +1,46 @@
|
||||
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 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,441 @@
|
||||
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 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;
|
||||
|
||||
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,20 @@
|
||||
package com.glxp.api.service.basic;
|
||||
|
||||
import com.glxp.api.entity.basic.BasicNewUploadDiEntity;
|
||||
import com.glxp.api.req.basic.FilterBasicNewUploadDiRequest;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface BasicNewUploadDiService {
|
||||
|
||||
|
||||
List<BasicNewUploadDiEntity> filterNewUploads(FilterBasicNewUploadDiRequest filterBasicNewUploadDiRequest);
|
||||
|
||||
boolean deleteById(Integer id);
|
||||
|
||||
boolean insertNewUploadDi(BasicNewUploadDiEntity newUploadDiEntity);
|
||||
|
||||
boolean updateNewUploadDi(BasicNewUploadDiEntity newUploadDiEntity);
|
||||
|
||||
|
||||
}
|
@ -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,21 @@
|
||||
package com.glxp.api.service.basic;
|
||||
|
||||
|
||||
|
||||
|
||||
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 {
|
||||
|
||||
List<CompanyProductRelevanceResponse> filterUdiGp(CompanyProductRelevanceRequest basicInstrumentMaintainRequest);
|
||||
|
||||
boolean insertCompanyProductRelevance(CompanyProductRelevanceEntity companyCertEntity);
|
||||
|
||||
boolean deleteById(String id);
|
||||
|
||||
boolean deleteByRlId(String id);
|
||||
}
|
@ -0,0 +1,47 @@
|
||||
package com.glxp.api.service.basic.impl;
|
||||
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import com.glxp.api.dao.basic.BasicNewUploadDiDao;
|
||||
import com.glxp.api.entity.basic.BasicNewUploadDiEntity;
|
||||
import com.glxp.api.req.basic.FilterBasicNewUploadDiRequest;
|
||||
import com.glxp.api.service.basic.BasicNewUploadDiService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
public class BasicNewUploadDiServiceImpl implements BasicNewUploadDiService {
|
||||
@Resource
|
||||
BasicNewUploadDiDao newUploadDiDao;
|
||||
|
||||
@Override
|
||||
public List<BasicNewUploadDiEntity> filterNewUploads(FilterBasicNewUploadDiRequest filterNewUploadDiRequest) {
|
||||
|
||||
if (filterNewUploadDiRequest == null) {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
if (filterNewUploadDiRequest.getPage() != null) {
|
||||
int offset = (filterNewUploadDiRequest.getPage() - 1) * filterNewUploadDiRequest.getLimit();
|
||||
PageHelper.offsetPage(offset, filterNewUploadDiRequest.getLimit());
|
||||
}
|
||||
List<BasicNewUploadDiEntity> data = newUploadDiDao.filterNewUploads(filterNewUploadDiRequest);
|
||||
return data;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean deleteById(Integer id) {
|
||||
return newUploadDiDao.deleteById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean insertNewUploadDi(BasicNewUploadDiEntity newUploadDiEntity) {
|
||||
return newUploadDiDao.insertNewUploadDi(newUploadDiEntity);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean updateNewUploadDi(BasicNewUploadDiEntity newUploadDiEntity) {
|
||||
return newUploadDiDao.updateNewUploadDi(newUploadDiEntity);
|
||||
}
|
||||
}
|
@ -0,0 +1,58 @@
|
||||
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 javax.annotation.Resource;
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@Service
|
||||
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,49 @@
|
||||
package com.glxp.api.service.basic.impl;
|
||||
|
||||
|
||||
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 javax.annotation.Resource;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
public class CompanyProductRelevanceServiceImpl 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);
|
||||
}
|
||||
}
|
@ -0,0 +1,35 @@
|
||||
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);
|
||||
}
|
@ -0,0 +1,27 @@
|
||||
package com.glxp.api.service.thrsys;
|
||||
|
||||
|
||||
|
||||
import com.glxp.api.entity.thrsys.ThrProductsAddEntity;
|
||||
import com.glxp.api.req.thrsys.FilterThrProductsRequest;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface ThrProductsAddService {
|
||||
|
||||
List<ThrProductsAddEntity> filterThrProductsRequest(FilterThrProductsRequest filterThrProductsRequest);
|
||||
|
||||
List<ThrProductsAddEntity> selectThrProducts(FilterThrProductsRequest filterThrProductsRequest);
|
||||
|
||||
ThrProductsAddEntity selectById(String id);
|
||||
|
||||
boolean insertThrProducts(ThrProductsAddEntity thrProductsEntity);
|
||||
|
||||
boolean insertThrProductss(List<ThrProductsAddEntity> thrProductsEntities);
|
||||
|
||||
boolean updateThrProducts(ThrProductsAddEntity thrProductsEntity);
|
||||
|
||||
boolean deleteById(String id);
|
||||
|
||||
boolean deleteAll();
|
||||
}
|
@ -0,0 +1,110 @@
|
||||
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.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.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
|
||||
public class ThrProductsAddDiServiceImpl implements ThrProductsAddDiService {
|
||||
|
||||
@Resource
|
||||
private ThrProductsAddDiDao thrProductsAddDiDao;
|
||||
|
||||
@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);
|
||||
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) {
|
||||
ThrProductsAddDiEntity thrProductsAddDiEntity = new ThrProductsAddDiEntity();
|
||||
BeanUtils.copyProperties(thrDiProductsRequest, thrProductsAddDiEntity);
|
||||
thrProductsAddDiEntity.setCustomerId(customerId+"");
|
||||
thrProductsAddDiEntity.setUuid(uuid);
|
||||
thrProductsAddDiEntity.setCreateTime(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);
|
||||
udiInfoResponse.setSptm(thrProductsAddDiEntity.getSptm());
|
||||
udiInfoResponse.setYbbm(thrProductsAddDiEntity.getYbbm());
|
||||
udiInfoResponse.setManufactory(thrProductsAddDiEntity.getManufactory());
|
||||
udiInfoResponse.setCpms(thrProductsAddDiEntity.getCpms());
|
||||
return udiInfoResponse;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ThrProductsAddDiEntity filterThrProductsGetId(Integer id) {
|
||||
return thrProductsAddDiDao.filterThrProductsGetId(id);
|
||||
}
|
||||
}
|
@ -0,0 +1,76 @@
|
||||
package com.glxp.api.service.thrsys.impl;
|
||||
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import com.glxp.api.dao.thrsys.ThrProductsAddDao;
|
||||
import com.glxp.api.entity.thrsys.ThrProductsAddEntity;
|
||||
import com.glxp.api.req.thrsys.FilterThrProductsRequest;
|
||||
import com.glxp.api.service.thrsys.ThrProductsAddService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
public class ThrProductsAddServiceImpl implements ThrProductsAddService {
|
||||
|
||||
@Resource
|
||||
ThrProductsAddDao thrProductsAddDao;
|
||||
|
||||
|
||||
@Override
|
||||
public List<ThrProductsAddEntity> filterThrProductsRequest(FilterThrProductsRequest filterThrProductsRequest) {
|
||||
if (filterThrProductsRequest == null) {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
if (filterThrProductsRequest.getPage() != null) {
|
||||
int offset = (filterThrProductsRequest.getPage() - 1) * filterThrProductsRequest.getLimit();
|
||||
PageHelper.offsetPage(offset, filterThrProductsRequest.getLimit());
|
||||
}
|
||||
List<ThrProductsAddEntity> data = thrProductsAddDao.filterThrProductsRequest(filterThrProductsRequest);
|
||||
return data;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ThrProductsAddEntity> selectThrProducts(FilterThrProductsRequest filterThrProductsRequest) {
|
||||
if (filterThrProductsRequest == null) {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
if (filterThrProductsRequest.getPage() != null) {
|
||||
int offset = (filterThrProductsRequest.getPage() - 1) * filterThrProductsRequest.getLimit();
|
||||
PageHelper.offsetPage(offset, filterThrProductsRequest.getLimit());
|
||||
}
|
||||
List<ThrProductsAddEntity> data = thrProductsAddDao.selectThrProducts(filterThrProductsRequest);
|
||||
return data;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ThrProductsAddEntity selectById(String id) {
|
||||
return thrProductsAddDao.selectById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean insertThrProducts(ThrProductsAddEntity thrProductsEntity) {
|
||||
return thrProductsAddDao.insertThrProducts(thrProductsEntity);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean insertThrProductss(List<ThrProductsAddEntity> thrProductsEntities) {
|
||||
return thrProductsAddDao.insertThrProductss(thrProductsEntities);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean updateThrProducts(ThrProductsAddEntity thrProductsEntity) {
|
||||
return thrProductsAddDao.updateThrProducts(thrProductsEntity);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean deleteById(String id) {
|
||||
return thrProductsAddDao.deleteById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean deleteAll() {
|
||||
return thrProductsAddDao.deleteAll();
|
||||
}
|
||||
}
|
@ -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,65 @@
|
||||
<?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.BasicNewUploadDiDao">
|
||||
|
||||
<select id="filterNewUploads" parameterType="com.glxp.api.req.basic.FilterBasicNewUploadDiRequest"
|
||||
resultType="com.glxp.api.entity.basic.BasicNewUploadDiEntity">
|
||||
SELECT * FROM basic_new_udi_upload
|
||||
<where>
|
||||
<if test="id != '' and id != null">
|
||||
AND id = #{id}
|
||||
</if>
|
||||
<if test="relId != '' and relId != null">
|
||||
AND relId = #{relId}
|
||||
</if>
|
||||
<if test="thirdSysFk != '' and thirdSysFk != null">
|
||||
AND thirdSysFk = #{thirdSysFk}
|
||||
</if>
|
||||
<if test="uploadStatus != '' and uploadStatus != null">
|
||||
AND uploadStatus = #{uploadStatus}
|
||||
</if>
|
||||
<if test="uploadCode != '' and uploadCode != null">
|
||||
AND uploadCode = #{uploadCode}
|
||||
</if>
|
||||
<if test="lastUpdateTime!=null and lastUpdateTime!=''">
|
||||
<![CDATA[ and DATE_FORMAT(updateTime, '%Y-%m-%d %H:%i:%S')>= DATE_FORMAT(#{lastUpdateTime}, '%Y-%m-%d %H:%i:%S') ]]>
|
||||
</if>
|
||||
</where>
|
||||
ORDER BY updateTime DESC
|
||||
</select>
|
||||
|
||||
|
||||
<insert id="insertNewUploadDi" keyProperty="id" parameterType="com.glxp.api.entity.basic.BasicNewUploadDiEntity">
|
||||
insert INTO basic_new_udi_upload
|
||||
(relId, thirdSysFk, uploadStatus, uploadMsg, uploadCode, remark, updateTime, submitTime)
|
||||
values (#{relId},
|
||||
#{thirdSysFk},
|
||||
#{uploadStatus},
|
||||
#{uploadMsg}, #{uploadCode}, #{remark}, #{updateTime}, #{submitTime})
|
||||
</insert>
|
||||
|
||||
|
||||
<delete id="deleteById" parameterType="Map">
|
||||
DELETE
|
||||
FROM basic_new_udi_upload
|
||||
WHERE id = #{id}
|
||||
</delete>
|
||||
|
||||
<update id="updateNewUploadDi" parameterType="com.glxp.api.entity.basic.BasicNewUploadDiEntity">
|
||||
UPDATE basic_new_udi_upload
|
||||
<set>
|
||||
<if test="relId != null">relId=#{relId},</if>
|
||||
<if test="thirdSysFk != null">thirdSysFk=#{thirdSysFk},</if>
|
||||
<if test="updateTime != null">updateTime=#{updateTime},</if>
|
||||
<if test="uploadStatus != null">uploadStatus=#{uploadStatus},</if>
|
||||
<if test="uploadMsg != null">uploadMsg=#{uploadMsg},</if>
|
||||
<if test="uploadCode != null">uploadCode=#{uploadCode},</if>
|
||||
<if test="remark != null">remark=#{remark},</if>
|
||||
<if test="updateTime != null">updateTime=#{updateTime},</if>
|
||||
<if test="submitTime != null">submitTime=#{submitTime},</if>
|
||||
</set>
|
||||
WHERE id = #{id}
|
||||
</update>
|
||||
|
||||
</mapper>
|
@ -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,223 @@
|
||||
<?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.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_udirel.ybbm LIKE concat('%',#{unionCode},'%')
|
||||
or basic_udirel.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="isDisable == false">
|
||||
AND (basic_udirel.isDisable is null or basic_udirel.isDisable = false )
|
||||
</if>
|
||||
</where>
|
||||
ORDER BY company_product_relevance.updateTime DESC
|
||||
</select>
|
||||
|
||||
</mapper>
|
@ -0,0 +1,206 @@
|
||||
<?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.thrsys.ThrProductsAddDao">
|
||||
|
||||
<select id="filterThrProductsRequest" parameterType="com.glxp.api.req.thrsys.FilterThrProductsRequest"
|
||||
resultType="com.glxp.api.entity.thrsys.ThrProductsAddEntity">
|
||||
SELECT thr_products_add.*,basic_corp.name corpName,basic_third_sys.thirdName FROM thr_products_add
|
||||
left join basic_corp on thr_products_add.customerId = basic_corp.erpId
|
||||
left join sup_company on sup_company.customerid=thr_products_add.customerid
|
||||
left join basic_third_sys on thr_products_add.thirdSysFk=basic_third_sys.thirdId
|
||||
<where>
|
||||
<if test="name != '' and name != null">
|
||||
AND thr_products_add.name LIKE concat('%',#{name},'%')
|
||||
</if>
|
||||
<if test="code != '' and code != null">
|
||||
AND code LIKE concat('%',#{code},'%')
|
||||
</if>
|
||||
<if test="registerNo != '' and registerNo != null">
|
||||
AND registerNo LIKE concat('%',#{registerNo},'%')
|
||||
</if>
|
||||
<if test="manufactory != '' and manufactory != null">
|
||||
AND manufactory LIKE concat('%',#{manufactory},'%')
|
||||
</if>
|
||||
<if test="spec != '' and spec != null">
|
||||
AND spec LIKE concat('%',#{spec},'%')
|
||||
</if>
|
||||
|
||||
<if test="supName != '' and supName != null">
|
||||
AND supName LIKE concat('%',#{supName},'%')
|
||||
</if>
|
||||
<if test="unionCode != '' and unionCode != null">
|
||||
or code LIKE concat('%',#{unionCode},'%') or sptm LIKE concat('%',#{unionCode},'%') or ybbm LIKE
|
||||
concat('%',#{unionCode},'%')
|
||||
</if>
|
||||
|
||||
<if test="thirdSysFk != '' and thirdSysFk != null">
|
||||
AND thirdSysFk = #{thirdSysFk}
|
||||
</if>
|
||||
<if test="checkStatus != '' and checkStatus != null">
|
||||
AND checkStatus = #{checkStatus}
|
||||
</if>
|
||||
<if test="customerId != '' and customerId != null">
|
||||
AND thr_products_add.customerId = #{customerId}
|
||||
</if>
|
||||
<if test="companyName != '' and companyName != null">
|
||||
AND basic_corp.name = #{companyName}
|
||||
</if>
|
||||
|
||||
|
||||
|
||||
|
||||
</where>
|
||||
group by thr_products_add.id
|
||||
ORDER BY updateTime DESC
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
<select id="selectThrProducts" parameterType="com.glxp.api.req.thrsys.FilterThrProductsRequest"
|
||||
resultType="com.glxp.api.entity.thrsys.ThrProductsAddEntity">
|
||||
SELECT * FROM thr_products_add
|
||||
<where>
|
||||
<if test="name != '' and name != null">
|
||||
AND name =#{name}
|
||||
</if>
|
||||
<if test="code != '' and code != null">
|
||||
AND code =#{code}
|
||||
</if>
|
||||
<if test="registerNo != '' and registerNo != null">
|
||||
AND registerNo=#{registerNo}
|
||||
</if>
|
||||
<if test="manufactory != '' and manufactory != null">
|
||||
AND manufactory=#{manufactory}
|
||||
</if>
|
||||
<if test="thirdSysFk != '' and thirdSysFk != null">
|
||||
AND thirdSysFk = #{thirdSysFk}
|
||||
</if>
|
||||
<if test="checkStatus != '' and checkStatus != null">
|
||||
AND checkStatus = #{checkStatus}
|
||||
</if>
|
||||
<if test="customerId != '' and customerId != null">
|
||||
AND customerId = #{customerId}
|
||||
</if>
|
||||
</where>
|
||||
ORDER BY updateTime DESC
|
||||
</select>
|
||||
|
||||
|
||||
<select id="batchSelectByIds" resultType="com.glxp.api.entity.thrsys.ThrProductsAddEntity">
|
||||
select *
|
||||
from thr_products_add where code in
|
||||
<foreach collection="codes" item="item" index="index" separator="," open="(" close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
and thirdSysFk = #{thirdSysFk}
|
||||
</select>
|
||||
|
||||
|
||||
<select id="selectById" parameterType="Map" resultType="com.glxp.api.entity.thrsys.ThrProductsAddEntity">
|
||||
select *
|
||||
FROM thr_products_add
|
||||
WHERE id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertThrProducts" keyProperty="id"
|
||||
parameterType="com.glxp.api.entity.thrsys.ThrProductsAddEntity">
|
||||
replace
|
||||
INTO thr_products_add
|
||||
(
|
||||
code,`name`,measname,spec,registerNo,manufactory,
|
||||
cplb,flbm,qxlb,ybbm,sptm,tyshxydm,zczbhhzbapzbh,ylqxzcrbarmc,ylqxzcrbarywmc,cpms,
|
||||
thirdSysFk,updateTime,supName,checkStatus,customerId,relId
|
||||
)
|
||||
values
|
||||
(
|
||||
#{code},
|
||||
#{name},
|
||||
#{measname},
|
||||
#{spec},
|
||||
#{registerNo},
|
||||
#{manufactory},
|
||||
#{cplb},
|
||||
#{flbm},
|
||||
#{qxlb},
|
||||
#{ybbm},
|
||||
#{sptm},
|
||||
#{tyshxydm},
|
||||
#{zczbhhzbapzbh},
|
||||
#{ylqxzcrbarmc},
|
||||
#{ylqxzcrbarywmc},
|
||||
#{cpms},
|
||||
#{thirdSysFk},
|
||||
#{updateTime},
|
||||
#{supName},
|
||||
#{checkStatus},
|
||||
#{customerId},#{relId}
|
||||
)
|
||||
</insert>
|
||||
|
||||
<insert id="insertThrProductss" keyProperty="id" parameterType="java.util.List">
|
||||
replace INTO thr_products_add
|
||||
(
|
||||
code,name,measname,spec,registerNo,manufactory,
|
||||
cplb,flbm,qxlb,ybbm,sptm,tyshxydm,zczbhhzbapzbh,ylqxzcrbarmc,ylqxzcrbarywmc,cpms,
|
||||
thirdSysFk,updateTime,supName,checkStatus,customerId,relId
|
||||
)
|
||||
values
|
||||
|
||||
<foreach collection="thrProductsEntities" item="item" index="index"
|
||||
separator=",">
|
||||
(
|
||||
#{item.code},
|
||||
#{item.name},
|
||||
#{item.measname},
|
||||
#{item.spec},
|
||||
#{item.registerNo},
|
||||
#{item.manufactory},
|
||||
#{item.cplb}, #{item.flbm}, #{item.qxlb}, #{item.ybbm},#{item.sptm},
|
||||
#{item.tyshxydm}, #{item.zczbhhzbapzbh}, #{item.ylqxzcrbarmc}, #{item.ylqxzcrbarywmc},#{item.cpms},
|
||||
#{item.thirdSysFk},#{item.updateTime},#{item.supName}, #{tem.checkStatus}, #{tem.customerId},#{item.relId}
|
||||
)
|
||||
</foreach>
|
||||
</insert>
|
||||
|
||||
<delete id="deleteById" parameterType="Map">
|
||||
DELETE
|
||||
FROM thr_products_add
|
||||
WHERE id = #{id}
|
||||
</delete>
|
||||
|
||||
<update id="updateThrProducts" parameterType="com.glxp.api.entity.thrsys.ThrProductsAddEntity">
|
||||
UPDATE thr_products_add
|
||||
<trim prefix="set" suffixOverrides=",">
|
||||
<if test="code != null">code=#{code},</if>
|
||||
<if test="name != null">name=#{name},</if>
|
||||
<if test="measname != null">measname=#{measname},</if>
|
||||
<if test="spec != null">spec=#{spec},</if>
|
||||
<if test="registerNo != null">registerNo=#{registerNo},</if>
|
||||
<if test="cplb != null">cplb=#{cplb},</if>
|
||||
<if test="flbm != null">flbm=#{flbm},</if>
|
||||
<if test="qxlb != null">qxlb=#{qxlb},</if>
|
||||
<if test="ybbm != null">ybbm=#{ybbm},</if>
|
||||
<if test="sptm != null">sptm=#{sptm},</if>
|
||||
<if test="tyshxydm != null">tyshxydm=#{tyshxydm},</if>
|
||||
<if test="zczbhhzbapzbh != null">zczbhhzbapzbh=#{zczbhhzbapzbh},</if>
|
||||
<if test="ylqxzcrbarmc != null">ylqxzcrbarmc=#{ylqxzcrbarmc},</if>
|
||||
<if test="ylqxzcrbarywmc != null">ylqxzcrbarywmc=#{ylqxzcrbarywmc},</if>
|
||||
<if test="manufactory != null">manufactory=#{manufactory},</if>
|
||||
<if test="cpms != null">cpms=#{cpms},</if>
|
||||
<if test="thirdSysFk != null">thirdSysFk=#{thirdSysFk},</if>
|
||||
<if test="updateTime != null">updateTime=#{updateTime},</if>
|
||||
<if test="supName != null">supName=#{supName},</if>
|
||||
<if test="checkStatus != null">checkStatus=#{checkStatus},</if>
|
||||
<if test="customerId != null">customerId=#{customerId},</if>
|
||||
<if test="remark != null">remark=#{remark},</if>
|
||||
</trim>
|
||||
WHERE id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteAll">
|
||||
DELETE
|
||||
FROM thr_products_add
|
||||
</delete>
|
||||
|
||||
</mapper>
|
@ -0,0 +1,148 @@
|
||||
<?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.thrsys.ThrProductsAddDiDao">
|
||||
|
||||
<insert id="insertThrDiProducts" keyProperty="id" parameterType="java.util.List">
|
||||
insert into thr_products_add_di (uuid, customerId, createTime, auditTime, remark, auditUser, `status`
|
||||
, thirdSysFk, code, sptm, ybbm, measname,manufactory,spmc,cpms,selectThridSysStr,price,
|
||||
basicPrductRemak1,basicPrductRemak2,basicPrductRemak3,basicPrductRemak4,
|
||||
basicPrductRemak5,basicPrductRemak6,basicPrductRemak7,basicPrductRemak8
|
||||
)
|
||||
values
|
||||
<foreach collection="list" index="index" item="item" separator=",">
|
||||
( #{item.uuid},
|
||||
#{item.customerId},
|
||||
#{item.createTime},
|
||||
#{item.auditTime},
|
||||
#{item.remark},
|
||||
#{item.auditUser},
|
||||
#{item.status},
|
||||
#{item.thirdSysFk},
|
||||
#{item.code},
|
||||
#{item.sptm},
|
||||
#{item.ybbm},
|
||||
#{item.measname},
|
||||
#{item.manufactory},
|
||||
#{item.spmc},
|
||||
#{item.cpms},#{item.selectThridSysStr},#{item.price}
|
||||
,#{item.basicPrductRemak1},#{item.basicPrductRemak2},#{item.basicPrductRemak3},#{item.basicPrductRemak4}
|
||||
,#{item.basicPrductRemak5},#{item.basicPrductRemak6},#{item.basicPrductRemak7},#{item.basicPrductRemak8}
|
||||
)
|
||||
</foreach>
|
||||
</insert>
|
||||
|
||||
<update id="updateDiProduct" parameterType="com.glxp.api.entity.thrsys.ThrProductsAddDiEntity">
|
||||
update thr_products_add_di
|
||||
<trim prefix="set" suffixOverrides=",">
|
||||
<if test="uuid != null">uuid=#{uuid},</if>
|
||||
<if test="customerId != null">customerId=#{customerId},</if>
|
||||
<if test="createTime != null">createTime=#{createTime},</if>
|
||||
<if test="auditTime != null">auditTime=#{auditTime},</if>
|
||||
<if test="remark != null">remark=#{remark},</if>
|
||||
<if test="auditUser != null">auditUser=#{auditUser},</if>
|
||||
<if test="thirdSysFk != null">`thirdSysFk`=#{thirdSysFk},</if>
|
||||
<if test="code != null">`code`=#{code},</if>
|
||||
<if test="sptm != null">`sptm`=#{sptm},</if>
|
||||
<if test="ybbm != null">`ybbm`=#{ybbm},</if>
|
||||
<if test="measname != null">`measname`=#{measname},</if>
|
||||
<if test="manufactory != null">`manufactory`=#{manufactory},</if>
|
||||
<if test="spmc != null">`spmc`=#{spmc},</if>
|
||||
<if test="cpms != null">`cpms`=#{cpms},</if>
|
||||
<if test="status != null">`status`=#{status},</if>
|
||||
<if test="price != null">`price`=#{price},</if>
|
||||
<if test="basicPrductRemak1 != null">`basicPrductRemak1`=#{basicPrductRemak1},</if>
|
||||
<if test="basicPrductRemak2 != null">`basicPrductRemak2`=#{basicPrductRemak2},</if>
|
||||
<if test="basicPrductRemak3 != null">`basicPrductRemak3`=#{basicPrductRemak3},</if>
|
||||
<if test="basicPrductRemak4 != null">`basicPrductRemak4`=#{basicPrductRemak4},</if>
|
||||
<if test="basicPrductRemak5 != null">`basicPrductRemak5`=#{basicPrductRemak5},</if>
|
||||
<if test="basicPrductRemak6 != null">`basicPrductRemak6`=#{basicPrductRemak6},</if>
|
||||
<if test="basicPrductRemak7 != null">`basicPrductRemak7`=#{basicPrductRemak7},</if>
|
||||
<if test="basicPrductRemak8 != null">`basicPrductRemak8`=#{basicPrductRemak8},</if>
|
||||
<if test="selectThridSysStr != null">`selectThridSysStr`=#{selectThridSysStr},</if>
|
||||
|
||||
</trim>
|
||||
WHERE id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteById">
|
||||
delete
|
||||
from thr_products_add_di
|
||||
where id = #{id}
|
||||
</delete>
|
||||
|
||||
<select id="filterThrProductsGetId" parameterType="integer"
|
||||
resultType="com.glxp.api.entity.thrsys.ThrProductsAddDiEntity">
|
||||
select *
|
||||
from thr_products_add_di
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<select id="filterThrProductsGetUuid" parameterType="string"
|
||||
resultType="com.glxp.api.entity.thrsys.ThrProductsAddDiEntity">
|
||||
select *
|
||||
from thr_products_add_di
|
||||
where uuid = #{uuid}
|
||||
</select>
|
||||
|
||||
|
||||
<select id="filterThrProductsList" parameterType="com.glxp.api.req.thrsys.FilterThrProductsRequest"
|
||||
resultType="com.glxp.api.res.thrsys.ThrProductsAddDiResponse">
|
||||
SELECT tdi.*,
|
||||
p.nameCode,
|
||||
p.cpmctymc,
|
||||
p.ggxh,
|
||||
p.ylqxzcrbarmc,
|
||||
p.zczbhhzbapzbh
|
||||
FROM thr_products_add_di tdi
|
||||
LEFT JOIN productinfo p ON tdi.uuid = p.uuid
|
||||
LEFT JOIN sup_company c on c.customerId=tdi.customerId
|
||||
<where>
|
||||
<if test="checkStatus != null">
|
||||
AND tdi.status = #{checkStatus}
|
||||
</if>
|
||||
<if test="id != null">
|
||||
AND tdi.id = #{id}
|
||||
</if>
|
||||
<if test="customerId != null">
|
||||
AND tdi.customerId = #{customerId}
|
||||
</if>
|
||||
<if test="name != '' and name != null">
|
||||
AND p.cpmctymc like concat('%', #{name}, '%')
|
||||
</if>
|
||||
<if test="registerNo != '' and registerNo != null">
|
||||
AND p.zczbhhzbapzbh LIKE concat('%',#{registerNo},'%')
|
||||
</if>
|
||||
<if test="spec != '' and spec != null">
|
||||
AND p.ggxh LIKE concat('%',#{spec},'%')
|
||||
</if>
|
||||
<if test="code != '' and code != null">
|
||||
AND ( tdi.sptm = #{code} OR p.nameCode = #{code} OR tdi.ybbm=#{code})
|
||||
</if>
|
||||
<if test="uuid != '' and uuid != null">
|
||||
AND tdi.uuid = #{uuid}
|
||||
</if>
|
||||
<if test="diType != '' and diType != null">
|
||||
AND p.diType = #{diType}
|
||||
</if>
|
||||
<if test="diType != '' and diType != null">
|
||||
AND p.diType = #{diType}
|
||||
</if>
|
||||
<if test="companyName != '' and companyName != null">
|
||||
AND c.companyName = #{companyName}
|
||||
</if>
|
||||
|
||||
|
||||
|
||||
</where>
|
||||
order by tdi.createTime DESC
|
||||
|
||||
</select>
|
||||
|
||||
<select id="getDiProductDetail" resultType="com.glxp.api.res.thrsys.UdiInfoResponse">
|
||||
select *
|
||||
from productinfo
|
||||
where uuid = #{uuid} limit 1
|
||||
</select>
|
||||
|
||||
</mapper>
|
Loading…
Reference in New Issue