Merge remote-tracking branch 'origin/master'
# Conflicts: # src/main/java/com/glxp/api/dao/basic/UdiRelevanceDao.java # src/main/java/com/glxp/api/dao/thrsys/ThrProductsDao.java # src/main/java/com/glxp/api/service/basic/UdiRelevanceService.java # src/main/java/com/glxp/api/service/basic/impl/UdiRelevanceServiceImpl.java # src/main/resources/mybatis/mapper/thrsys/ThrProductsDao.xmlcert
commit
bd3a94ba44
@ -0,0 +1,218 @@
|
|||||||
|
package com.glxp.api.controller.basic;
|
||||||
|
|
||||||
|
import cn.hutool.core.collection.CollUtil;
|
||||||
|
import cn.hutool.core.util.StrUtil;
|
||||||
|
import com.github.pagehelper.PageInfo;
|
||||||
|
import com.glxp.api.annotation.AuthRuleAnnotation;
|
||||||
|
import com.glxp.api.annotation.Log;
|
||||||
|
import com.glxp.api.common.enums.ResultEnum;
|
||||||
|
import com.glxp.api.common.res.BaseResponse;
|
||||||
|
import com.glxp.api.common.util.ResultVOUtils;
|
||||||
|
import com.glxp.api.constant.BusinessType;
|
||||||
|
import com.glxp.api.constant.ConstantStatus;
|
||||||
|
import com.glxp.api.controller.BaseController;
|
||||||
|
import com.glxp.api.entity.basic.*;
|
||||||
|
import com.glxp.api.entity.system.SystemParamConfigEntity;
|
||||||
|
|
||||||
|
import com.glxp.api.entity.thrsys.ThrProductsEntity;
|
||||||
|
import com.glxp.api.entity.thrsys.ThrSystemEntity;
|
||||||
|
import com.glxp.api.req.basic.FilterUdiRelRequest;
|
||||||
|
import com.glxp.api.req.basic.LockUdiRequest;
|
||||||
|
import com.glxp.api.req.basic.ProductInfoFilterRequest;
|
||||||
|
import com.glxp.api.req.basic.UdiRelevanceSaveRequest;
|
||||||
|
import com.glxp.api.req.system.DeleteRequest;
|
||||||
|
import com.glxp.api.req.thrsys.FilterBasicThirdSysRequest;
|
||||||
|
import com.glxp.api.res.PageSimpleResponse;
|
||||||
|
import com.glxp.api.res.basic.BasicProductThirdSysResponse;
|
||||||
|
import com.glxp.api.res.basic.UdiRelevanceResponse;
|
||||||
|
import com.glxp.api.service.auth.CustomerService;
|
||||||
|
import com.glxp.api.service.basic.ProductInfoService;
|
||||||
|
import com.glxp.api.service.basic.UdiRelevanceService;
|
||||||
|
|
||||||
|
import com.glxp.api.service.system.SystemParamConfigService;
|
||||||
|
|
||||||
|
import com.glxp.api.service.thrsys.ThrDataService;
|
||||||
|
import com.glxp.api.service.thrsys.ThrSystemService;
|
||||||
|
import com.glxp.api.util.udi.FilterUdiUtils;
|
||||||
|
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 javax.annotation.Resource;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@RestController
|
||||||
|
public class UdiRelevanceController extends BaseController {
|
||||||
|
@Resource
|
||||||
|
UdiRelevanceService udiRelevanceService;
|
||||||
|
@Resource
|
||||||
|
private SystemParamConfigService systemParamConfigService;
|
||||||
|
@Resource
|
||||||
|
private ThrSystemService thrSystemService;
|
||||||
|
@Resource
|
||||||
|
ThrDataService thrDataService;
|
||||||
|
@Resource
|
||||||
|
ProductInfoService productInfoService;
|
||||||
|
|
||||||
|
//基础信息-耗材字典-查询页面、业务单据-选入耗材字典-查询页面
|
||||||
|
@AuthRuleAnnotation("")
|
||||||
|
@GetMapping("/directToCpt/udi/udirel/filterUdi")
|
||||||
|
public BaseResponse filterUdiGp(FilterUdiRelRequest filterUdiRelRequest,
|
||||||
|
BindingResult bindingResult) {
|
||||||
|
if (bindingResult.hasErrors()) {
|
||||||
|
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, bindingResult.getFieldError().getDefaultMessage());
|
||||||
|
}
|
||||||
|
if (StrUtil.isNotEmpty(filterUdiRelRequest.getUdiCode()) && StrUtil.isEmpty(filterUdiRelRequest.getUnionCode())) {
|
||||||
|
if (StrUtil.isNotEmpty(filterUdiRelRequest.getUdiCode())) {
|
||||||
|
UdiEntity udiEntity = FilterUdiUtils.getUdi(filterUdiRelRequest.getUdiCode());
|
||||||
|
filterUdiRelRequest.setNameCode(udiEntity.getUdi());
|
||||||
|
}
|
||||||
|
List<UdiRelevanceResponse> temps = udiRelevanceService.filterUdiGp(filterUdiRelRequest);
|
||||||
|
if (temps != null && temps.size() > 0) {
|
||||||
|
filterUdiRelRequest.setOriginUuid(temps.get(0).getOriginUuid());
|
||||||
|
filterUdiRelRequest.setNameCode(null);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
filterUdiRelRequest.setDiType(1);
|
||||||
|
}
|
||||||
|
List<UdiRelevanceResponse> udiRelevanceResponses = udiRelevanceService.filterUdiGp(filterUdiRelRequest);
|
||||||
|
PageInfo<UdiRelevanceResponse> pageInfo = new PageInfo<>(udiRelevanceResponses);
|
||||||
|
PageSimpleResponse<UdiRelevanceResponse> pageSimpleResponse = new PageSimpleResponse<>();
|
||||||
|
pageSimpleResponse.setTotal(pageInfo.getTotal());
|
||||||
|
pageSimpleResponse.setList(udiRelevanceResponses);
|
||||||
|
return ResultVOUtils.success(pageSimpleResponse);
|
||||||
|
}
|
||||||
|
|
||||||
|
//获取对照过滤列表
|
||||||
|
@AuthRuleAnnotation("")
|
||||||
|
@GetMapping("/directToCpt/udiwms/udirel/thirdSys/detail")
|
||||||
|
public BaseResponse getThirdSysDetail(FilterUdiRelRequest filterUdiRelRequest,
|
||||||
|
BindingResult bindingResult) {
|
||||||
|
|
||||||
|
if (bindingResult.hasErrors()) {
|
||||||
|
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, bindingResult.getFieldError().getDefaultMessage());
|
||||||
|
}
|
||||||
|
UdiRelevanceEntity udiRelevanceEntity = null;
|
||||||
|
if (filterUdiRelRequest.getUuid() != null) {
|
||||||
|
udiRelevanceEntity = udiRelevanceService.selectUpdateByUuid(filterUdiRelRequest.getUuid());
|
||||||
|
} else {
|
||||||
|
udiRelevanceEntity = udiRelevanceService.selectById(filterUdiRelRequest.getId());
|
||||||
|
}
|
||||||
|
|
||||||
|
FilterBasicThirdSysRequest filterBasicThirdSysRequest = new FilterBasicThirdSysRequest();
|
||||||
|
filterBasicThirdSysRequest.setEnabled(true);
|
||||||
|
List<ThrSystemEntity> basicThirdSysEntities = thrSystemService.filterBasicThiSys(filterBasicThirdSysRequest);
|
||||||
|
List<BasicProductThirdSysResponse> basicProductThirdSysResponses = new ArrayList<>();
|
||||||
|
|
||||||
|
if (basicThirdSysEntities != null && basicThirdSysEntities.size() > 0) {
|
||||||
|
for (ThrSystemEntity thrSystemEntity : basicThirdSysEntities) {
|
||||||
|
if (thrSystemEntity.getThirdId().equals("thirdId")) {
|
||||||
|
BasicProductThirdSysResponse basicProductThirdSysResponse = new BasicProductThirdSysResponse();
|
||||||
|
if (StrUtil.isNotEmpty(udiRelevanceEntity.getThirdId()))
|
||||||
|
basicProductThirdSysResponse.setThirdId(udiRelevanceEntity.getThirdId());
|
||||||
|
basicProductThirdSysResponse.setSysName(thrSystemEntity.getThirdName());
|
||||||
|
basicProductThirdSysResponse.setSysId(thrSystemEntity.getThirdId());
|
||||||
|
if (udiRelevanceEntity.getThirdId() != null && !udiRelevanceEntity.getThirdId().isEmpty()) {
|
||||||
|
if (udiRelevanceEntity.getThirdId() != null) {
|
||||||
|
ThrProductsEntity thrProductsEntity = thrDataService.getProducts(udiRelevanceEntity.getThirdId(), "thirdId");
|
||||||
|
if (thrProductsEntity != null) {
|
||||||
|
basicProductThirdSysResponse.setManufactory(thrProductsEntity.getManufactory());
|
||||||
|
basicProductThirdSysResponse.setRegisterNo(thrProductsEntity.getRegisterNo());
|
||||||
|
basicProductThirdSysResponse.setSpec(thrProductsEntity.getSpec());
|
||||||
|
basicProductThirdSysResponse.setThirdName(thrProductsEntity.getName());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
basicProductThirdSysResponses.add(basicProductThirdSysResponse);
|
||||||
|
}
|
||||||
|
if (thrSystemEntity.getThirdId().equals("thirdId1")) {
|
||||||
|
BasicProductThirdSysResponse basicProductThirdSysResponse = new BasicProductThirdSysResponse();
|
||||||
|
if (StrUtil.isNotEmpty(udiRelevanceEntity.getThirdId1()))
|
||||||
|
basicProductThirdSysResponse.setThirdId(udiRelevanceEntity.getThirdId1());
|
||||||
|
basicProductThirdSysResponse.setSysName(thrSystemEntity.getThirdName());
|
||||||
|
basicProductThirdSysResponse.setSysId(thrSystemEntity.getThirdId());
|
||||||
|
if (udiRelevanceEntity.getThirdId1() != null && !udiRelevanceEntity.getThirdId1().isEmpty()) {
|
||||||
|
ThrProductsEntity thrProductsEntity = thrDataService.getProducts(udiRelevanceEntity.getThirdId1(), "thirdId1");
|
||||||
|
if (thrProductsEntity != null) {
|
||||||
|
basicProductThirdSysResponse.setManufactory(thrProductsEntity.getManufactory());
|
||||||
|
basicProductThirdSysResponse.setRegisterNo(thrProductsEntity.getRegisterNo());
|
||||||
|
basicProductThirdSysResponse.setSpec(thrProductsEntity.getSpec());
|
||||||
|
basicProductThirdSysResponse.setThirdName(thrProductsEntity.getName());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
basicProductThirdSysResponses.add(basicProductThirdSysResponse);
|
||||||
|
}
|
||||||
|
if (thrSystemEntity.getThirdId().equals("thirdId2")) {
|
||||||
|
BasicProductThirdSysResponse basicProductThirdSysResponse = new BasicProductThirdSysResponse();
|
||||||
|
if (StrUtil.isNotEmpty(udiRelevanceEntity.getThirdId2()))
|
||||||
|
basicProductThirdSysResponse.setThirdId(udiRelevanceEntity.getThirdId2());
|
||||||
|
basicProductThirdSysResponse.setSysName(thrSystemEntity.getThirdName());
|
||||||
|
basicProductThirdSysResponse.setSysId(thrSystemEntity.getThirdId());
|
||||||
|
if (udiRelevanceEntity.getThirdId2() != null && !udiRelevanceEntity.getThirdId2().isEmpty()) {
|
||||||
|
ThrProductsEntity thrProductsEntity = thrDataService.getProducts(udiRelevanceEntity.getThirdId2(), "thirdId2");
|
||||||
|
if (thrProductsEntity != null) {
|
||||||
|
basicProductThirdSysResponse.setManufactory(thrProductsEntity.getManufactory());
|
||||||
|
basicProductThirdSysResponse.setRegisterNo(thrProductsEntity.getRegisterNo());
|
||||||
|
basicProductThirdSysResponse.setSpec(thrProductsEntity.getSpec());
|
||||||
|
basicProductThirdSysResponse.setThirdName(thrProductsEntity.getName());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
basicProductThirdSysResponses.add(basicProductThirdSysResponse);
|
||||||
|
}
|
||||||
|
if (thrSystemEntity.getThirdId().equals("thirdId3")) {
|
||||||
|
BasicProductThirdSysResponse basicProductThirdSysResponse = new BasicProductThirdSysResponse();
|
||||||
|
if (StrUtil.isNotEmpty(udiRelevanceEntity.getThirdId3()))
|
||||||
|
basicProductThirdSysResponse.setThirdId(udiRelevanceEntity.getThirdId3());
|
||||||
|
basicProductThirdSysResponse.setSysName(thrSystemEntity.getThirdName());
|
||||||
|
basicProductThirdSysResponse.setSysId(thrSystemEntity.getThirdId());
|
||||||
|
if (udiRelevanceEntity.getThirdId3() != null && !udiRelevanceEntity.getThirdId3().isEmpty()) {
|
||||||
|
ThrProductsEntity thrProductsEntity = thrDataService.getProducts(udiRelevanceEntity.getThirdId3(), "thirdId3");
|
||||||
|
if (thrProductsEntity != null) {
|
||||||
|
basicProductThirdSysResponse.setManufactory(thrProductsEntity.getManufactory());
|
||||||
|
basicProductThirdSysResponse.setRegisterNo(thrProductsEntity.getRegisterNo());
|
||||||
|
basicProductThirdSysResponse.setSpec(thrProductsEntity.getSpec());
|
||||||
|
basicProductThirdSysResponse.setThirdName(thrProductsEntity.getName());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
basicProductThirdSysResponses.add(basicProductThirdSysResponse);
|
||||||
|
}
|
||||||
|
if (thrSystemEntity.getThirdId().equals("thirdId4")) {
|
||||||
|
BasicProductThirdSysResponse basicProductThirdSysResponse = new BasicProductThirdSysResponse();
|
||||||
|
if (StrUtil.isNotEmpty(udiRelevanceEntity.getThirdId4()))
|
||||||
|
basicProductThirdSysResponse.setThirdId(udiRelevanceEntity.getThirdId4());
|
||||||
|
basicProductThirdSysResponse.setSysName(thrSystemEntity.getThirdName());
|
||||||
|
basicProductThirdSysResponse.setSysId(thrSystemEntity.getThirdId());
|
||||||
|
if (udiRelevanceEntity.getThirdId4() != null && !udiRelevanceEntity.getThirdId4().isEmpty()) {
|
||||||
|
ThrProductsEntity thrProductsEntity = thrDataService.getProducts(udiRelevanceEntity.getThirdId4(), "thirdId4");
|
||||||
|
if (thrProductsEntity != null) {
|
||||||
|
basicProductThirdSysResponse.setManufactory(thrProductsEntity.getManufactory());
|
||||||
|
basicProductThirdSysResponse.setRegisterNo(thrProductsEntity.getRegisterNo());
|
||||||
|
basicProductThirdSysResponse.setSpec(thrProductsEntity.getSpec());
|
||||||
|
basicProductThirdSysResponse.setThirdName(thrProductsEntity.getName());
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
basicProductThirdSysResponses.add(basicProductThirdSysResponse);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
PageInfo<BasicProductThirdSysResponse> pageInfo;
|
||||||
|
pageInfo = new PageInfo<>(basicProductThirdSysResponses);
|
||||||
|
PageSimpleResponse<BasicProductThirdSysResponse> pageSimpleResponse = new PageSimpleResponse<>();
|
||||||
|
pageSimpleResponse.setTotal(pageInfo.getTotal());
|
||||||
|
pageSimpleResponse.setList(basicProductThirdSysResponses);
|
||||||
|
return ResultVOUtils.success(pageSimpleResponse);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@ -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,20 @@
|
|||||||
|
package com.glxp.api.dao.thrsys;
|
||||||
|
|
||||||
|
import com.glxp.api.entity.thrsys.ThrSystemDetailEntity;
|
||||||
|
import com.glxp.api.req.thrsys.FilterBasicThirdSysDetailRequest;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Mapper
|
||||||
|
public interface ThrSystemDetailDao {
|
||||||
|
|
||||||
|
|
||||||
|
boolean updateBasicThirdSysDetail(ThrSystemDetailEntity basicThirdSysEntity);
|
||||||
|
|
||||||
|
ThrSystemDetailEntity selectByKey(@Param("key") String key, @Param("thirdSys") String thirdSys);
|
||||||
|
|
||||||
|
List<ThrSystemDetailEntity> filterBasicThirdSysDetail(FilterBasicThirdSysDetailRequest filterBasicThirdSysDetailRequest);
|
||||||
|
|
||||||
|
}
|
@ -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,30 @@
|
|||||||
|
package com.glxp.api.entity.thrsys;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class ThrSystemDetailEntity {
|
||||||
|
|
||||||
|
private Integer id;
|
||||||
|
private String key;
|
||||||
|
private String value;
|
||||||
|
private Boolean enabled;
|
||||||
|
private Boolean itrCache;
|
||||||
|
private String guideUrl;
|
||||||
|
private String thridUrl;
|
||||||
|
private String remark;
|
||||||
|
private String thirdSysFk;
|
||||||
|
private String name;
|
||||||
|
private Integer fromType;
|
||||||
|
private String localAction;
|
||||||
|
private String thirdAction;
|
||||||
|
|
||||||
|
public String getValue() {
|
||||||
|
if (value == null)
|
||||||
|
return null;
|
||||||
|
else if (thridUrl != null)
|
||||||
|
return thridUrl + value;
|
||||||
|
else
|
||||||
|
return value;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,173 @@
|
|||||||
|
package com.glxp.api.http;
|
||||||
|
|
||||||
|
import cn.hutool.core.util.StrUtil;
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import com.alibaba.fastjson.TypeReference;
|
||||||
|
import com.glxp.api.common.res.BaseResponse;
|
||||||
|
import com.glxp.api.common.util.ResultVOUtils;
|
||||||
|
import com.glxp.api.entity.thrsys.ThrSystemBusApiEntity;
|
||||||
|
import com.glxp.api.entity.thrsys.ThrSystemEntity;
|
||||||
|
import com.glxp.api.http.req.UdiwmsBusTypeRequest;
|
||||||
|
import com.glxp.api.http.req.UdiwmsUnitRequest;
|
||||||
|
import com.glxp.api.req.thrsys.FilterBasicThirdSysDetailRequest;
|
||||||
|
import com.glxp.api.req.thrsys.FilterThrProductsRequest;
|
||||||
|
|
||||||
|
import com.glxp.api.req.thrsys.UdiwmsWarehouseRequest;
|
||||||
|
import com.glxp.api.res.PageSimpleResponse;
|
||||||
|
import com.glxp.api.res.thrsys.ThrCorpsResponse;
|
||||||
|
import com.glxp.api.res.thrsys.ThrProductsResponse;
|
||||||
|
import com.glxp.api.res.thrsys.ThrUnitMaintainFilterRequest;
|
||||||
|
import com.glxp.api.res.thrsys.UdiwmsWarehouseDetail;
|
||||||
|
import com.glxp.api.service.thrsys.ThrSystemService;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.beans.BeanUtils;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 第三方服务HttpClient
|
||||||
|
*/
|
||||||
|
@Slf4j
|
||||||
|
@Service
|
||||||
|
public class ErpBasicClient {
|
||||||
|
@Resource
|
||||||
|
HttpOkClient httpOkClient;
|
||||||
|
@Resource
|
||||||
|
private ThrSystemService basicThirdSysService;
|
||||||
|
|
||||||
|
//获取往来单位
|
||||||
|
public BaseResponse<PageSimpleResponse<ThrCorpsResponse>> getErpCrop(ThrUnitMaintainFilterRequest thrUnitMaintainFilterRequest) {
|
||||||
|
UdiwmsUnitRequest udiwmsUnitRequest = new UdiwmsUnitRequest();
|
||||||
|
BeanUtils.copyProperties(thrUnitMaintainFilterRequest, udiwmsUnitRequest);
|
||||||
|
udiwmsUnitRequest.setUnitId(thrUnitMaintainFilterRequest.getErpId());
|
||||||
|
ThrSystemEntity thrSystemEntity = basicThirdSysService.selectByThirdId(thrUnitMaintainFilterRequest.getThirdSys());
|
||||||
|
|
||||||
|
try {
|
||||||
|
String url = thrSystemEntity.getThridUrl() + "/udiwms/erp/getUnits";
|
||||||
|
String response = httpOkClient.uCloudPost(url, udiwmsUnitRequest, thrSystemEntity);
|
||||||
|
if (StrUtil.isBlank(response)) {
|
||||||
|
return ResultVOUtils.error(500, "连接第三方系统接口服务出错!");
|
||||||
|
}
|
||||||
|
BaseResponse<PageSimpleResponse<ThrCorpsResponse>> udiDlDeviceResponse =
|
||||||
|
JSONObject.parseObject(response, new TypeReference<BaseResponse<PageSimpleResponse<ThrCorpsResponse>>>() {
|
||||||
|
});
|
||||||
|
return udiDlDeviceResponse;
|
||||||
|
} catch (Exception e) {
|
||||||
|
log.error("获取往来单位异常", e);
|
||||||
|
return ResultVOUtils.error(500, "连接第三方系统接口服务出错!");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//获取产品信息
|
||||||
|
public BaseResponse<PageSimpleResponse<ThrProductsResponse>> getErpProducts(FilterThrProductsRequest filterThrProductsRequest) {
|
||||||
|
|
||||||
|
ThrSystemEntity basicThirdSysEntity = basicThirdSysService.selectByThirdId(filterThrProductsRequest.getThirdSys());
|
||||||
|
String url = basicThirdSysEntity.getThridUrl() + "/udiwms/erp/getProducts";
|
||||||
|
|
||||||
|
try {
|
||||||
|
String response = httpOkClient.uCloudPost(url, filterThrProductsRequest, basicThirdSysEntity);
|
||||||
|
if (StrUtil.isBlank(response)) {
|
||||||
|
return ResultVOUtils.error(500, "连接第三方系统接口服务出错!");
|
||||||
|
}
|
||||||
|
BaseResponse<PageSimpleResponse<ThrProductsResponse>> udiDlDeviceResponse =
|
||||||
|
JSONObject.parseObject(response, new TypeReference<BaseResponse<PageSimpleResponse<ThrProductsResponse>>>() {
|
||||||
|
});
|
||||||
|
return udiDlDeviceResponse;
|
||||||
|
} catch (Exception e) {
|
||||||
|
log.error("获取产品信息异常", e);
|
||||||
|
return ResultVOUtils.error(500, "连接第三方系统接口服务出错!");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// //获取单据类型
|
||||||
|
// public BaseResponse<PageSimpleResponse<BasicThirdSysBusApiEntity>> getBusTypes(FilterBasicThirdSysDetailRequest filterBasicThirdSysDetailRequest) {
|
||||||
|
// BasicThirdSysEntity basicThirdSysEntity = basicThirdSysService.selectByThirdId(filterBasicThirdSysDetailRequest.getThirdSysFk());
|
||||||
|
// String url = basicThirdSysEntity.getThridUrl() + "/udiwms/erp/getOrderType";
|
||||||
|
// UdiwmsBusTypeRequest udiwmsBusTypeRequest = new UdiwmsBusTypeRequest();
|
||||||
|
// udiwmsBusTypeRequest.setThirdSys(filterBasicThirdSysDetailRequest.getThirdSysFk());
|
||||||
|
// udiwmsBusTypeRequest.setPage(filterBasicThirdSysDetailRequest.getPage());
|
||||||
|
// udiwmsBusTypeRequest.setLimit(filterBasicThirdSysDetailRequest.getLimit());
|
||||||
|
// try {
|
||||||
|
// String response = httpOkClient.uCloudPost(url, udiwmsBusTypeRequest, basicThirdSysEntity);
|
||||||
|
// log.info(response);
|
||||||
|
// BaseResponse<PageSimpleResponse<BasicThirdSysBusApiEntity>> udiDlDeviceResponse =
|
||||||
|
// JSONObject.parseObject(response, new TypeReference<BaseResponse<PageSimpleResponse<BasicThirdSysBusApiEntity>>>() {
|
||||||
|
// });
|
||||||
|
// return udiDlDeviceResponse;
|
||||||
|
// } catch (Exception e) {
|
||||||
|
// log.error("获取单据类型异常", e);
|
||||||
|
// return ResultVOUtils.error(500, "连接第三方系统接口服务出错!");
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
//查询仓库货位号
|
||||||
|
public BaseResponse<PageSimpleResponse<UdiwmsWarehouseDetail>> getWarehouse(UdiwmsWarehouseRequest udiwmsWarehouseRequest) {
|
||||||
|
ThrSystemEntity basicThirdSysEntity = basicThirdSysService.selectByThirdId(udiwmsWarehouseRequest.getThirdSys());
|
||||||
|
String url = basicThirdSysEntity.getThridUrl() + "/udiwms/erp/getWarehouse";
|
||||||
|
try {
|
||||||
|
String response = httpOkClient.uCloudPost(url, udiwmsWarehouseRequest);
|
||||||
|
BaseResponse<PageSimpleResponse<UdiwmsWarehouseDetail>> listBaseResponse =
|
||||||
|
JSONObject.parseObject(response, new TypeReference<BaseResponse<PageSimpleResponse<UdiwmsWarehouseDetail>>>() {
|
||||||
|
});
|
||||||
|
|
||||||
|
return listBaseResponse;
|
||||||
|
} catch (Exception e) {
|
||||||
|
log.error("获取第三方系统的仓库货位码异常", e);
|
||||||
|
return ResultVOUtils.error(500, "连接第三方系统接口服务出错");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//测试连通性
|
||||||
|
public BaseResponse testConnection(ThrSystemEntity thrSystemEntity) {
|
||||||
|
String response = httpOkClient.uCloudPost(thrSystemEntity.getThridUrl() + "/udispsync/sync/testConnection", "{}");
|
||||||
|
log.info(response);
|
||||||
|
if (StrUtil.isBlank(response)) {
|
||||||
|
return ResultVOUtils.error(500, "连接失败");
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
return JSONObject.parseObject(response, BaseResponse.class);
|
||||||
|
} catch (Exception e) {
|
||||||
|
log.info("测试第三方服务连通性失败");
|
||||||
|
return ResultVOUtils.error(500, "连接失败");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//测试连通性
|
||||||
|
public BaseResponse testThridConnect(ThrSystemEntity thrSystemEntity) {
|
||||||
|
String response = httpOkClient.uCloudPost(thrSystemEntity.getThridUrl() + "/udiwms/erp/testThirdSys", "{}");
|
||||||
|
log.info(response);
|
||||||
|
try {
|
||||||
|
return JSONObject.parseObject(response, BaseResponse.class);
|
||||||
|
} catch (Exception e) {
|
||||||
|
log.info("测试第三方服务接口连通性失败");
|
||||||
|
return ResultVOUtils.error(500, "连接失败");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//下载第三方系统单据类型
|
||||||
|
public BaseResponse<PageSimpleResponse<ThrSystemBusApiEntity>> getBusTypes(FilterBasicThirdSysDetailRequest filterBasicThirdSysDetailRequest) {
|
||||||
|
ThrSystemEntity thrSystemEntity = basicThirdSysService.selectByThirdId(filterBasicThirdSysDetailRequest.getThirdSysFk());
|
||||||
|
String url = thrSystemEntity.getThridUrl() + "/udiwms/erp/getOrderType";
|
||||||
|
UdiwmsBusTypeRequest udiwmsBusTypeRequest = new UdiwmsBusTypeRequest();
|
||||||
|
udiwmsBusTypeRequest.setThirdSys(filterBasicThirdSysDetailRequest.getThirdSysFk());
|
||||||
|
udiwmsBusTypeRequest.setPage(filterBasicThirdSysDetailRequest.getPage());
|
||||||
|
udiwmsBusTypeRequest.setLimit(filterBasicThirdSysDetailRequest.getLimit());
|
||||||
|
try {
|
||||||
|
String response = httpOkClient.uCloudPost(url, udiwmsBusTypeRequest, thrSystemEntity);
|
||||||
|
log.info(response);
|
||||||
|
BaseResponse<PageSimpleResponse<ThrSystemBusApiEntity>> udiDlDeviceResponse =
|
||||||
|
JSONObject.parseObject(response, new TypeReference<BaseResponse<PageSimpleResponse<ThrSystemBusApiEntity>>>() {
|
||||||
|
});
|
||||||
|
if(udiDlDeviceResponse!=null){
|
||||||
|
return udiDlDeviceResponse;
|
||||||
|
}else{
|
||||||
|
return ResultVOUtils.error(500, "查询第三方数据失败!");
|
||||||
|
}
|
||||||
|
|
||||||
|
} catch (Exception e) {
|
||||||
|
log.error("获取单据类型异常", e);
|
||||||
|
return ResultVOUtils.error(500, "连接第三方系统接口服务出错!");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,41 @@
|
|||||||
|
package com.glxp.api.http.req;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 下载第三方单据单据类型请求参数
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class UdiwmsBusTypeRequest {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 数据ID
|
||||||
|
*/
|
||||||
|
private String id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 编码
|
||||||
|
*/
|
||||||
|
private String code;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 名称
|
||||||
|
*/
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 页码
|
||||||
|
*/
|
||||||
|
private Integer page;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 数据条数
|
||||||
|
*/
|
||||||
|
private Integer limit;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 第三方系统标识
|
||||||
|
*/
|
||||||
|
private String thirdSys;
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,12 @@
|
|||||||
|
package com.glxp.api.http.req;
|
||||||
|
|
||||||
|
|
||||||
|
import com.glxp.api.util.page.ListPageRequest;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class UdiwmsUnitRequest extends ListPageRequest {
|
||||||
|
String key;
|
||||||
|
private String unitId;
|
||||||
|
private String name;
|
||||||
|
}
|
@ -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,16 @@
|
|||||||
|
package com.glxp.api.req.thrsys;
|
||||||
|
|
||||||
|
import com.glxp.api.util.page.ListPageRequest;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class FilterBasicThirdSysDetailRequest extends ListPageRequest {
|
||||||
|
|
||||||
|
private String key;
|
||||||
|
private String thirdSysFk;
|
||||||
|
private String code;
|
||||||
|
private String name;
|
||||||
|
private Integer type;
|
||||||
|
private Boolean enabled;
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,21 @@
|
|||||||
|
package com.glxp.api.req.thrsys;
|
||||||
|
|
||||||
|
import com.glxp.api.util.page.ListPageRequest;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 仓库货位信息查询参数
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class UdiwmsWarehouseRequest extends ListPageRequest {
|
||||||
|
|
||||||
|
//仓库号,支持模糊查询
|
||||||
|
private String inventoryCode;
|
||||||
|
|
||||||
|
//货位号,支持模糊查询
|
||||||
|
private String warehouseCode;
|
||||||
|
|
||||||
|
//第三方系统ID
|
||||||
|
private String thirdSys;
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,27 @@
|
|||||||
|
package com.glxp.api.res.thrsys;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class ThrCorpsResponse {
|
||||||
|
|
||||||
|
private String id;
|
||||||
|
private String name;
|
||||||
|
private String spell;
|
||||||
|
private String addr;
|
||||||
|
private String creditNo;
|
||||||
|
private String contact;
|
||||||
|
private String mobile;
|
||||||
|
private Boolean checked;
|
||||||
|
private String unitId; //必填 往来单位ID
|
||||||
|
private String thirdSysFk;
|
||||||
|
private String createUser;
|
||||||
|
private Date createTime;
|
||||||
|
private String updateUser;
|
||||||
|
private Date updateTime;
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@ -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,51 @@
|
|||||||
|
package com.glxp.api.res.thrsys;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class ThrProductsResponse {
|
||||||
|
|
||||||
|
private Long id;
|
||||||
|
private String code; //产品编码
|
||||||
|
private String name;
|
||||||
|
private String measname; //计量单位
|
||||||
|
private String spec; //规格型号
|
||||||
|
private String registerNo; //注册证号
|
||||||
|
private String thirdSysFk;
|
||||||
|
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 String thirdSysName;
|
||||||
|
|
||||||
|
|
||||||
|
//辅助字段
|
||||||
|
private boolean isChecked;
|
||||||
|
private String thirdSys;
|
||||||
|
|
||||||
|
//添加字段
|
||||||
|
private String model; //型号
|
||||||
|
private String standard; //规格型号,二合一字段
|
||||||
|
private String qtbm; //其他编码
|
||||||
|
private String zczyxqz; //注册有效期截止时间
|
||||||
|
private String price;
|
||||||
|
private String remark1; //备注1
|
||||||
|
private String remark2; //备注2
|
||||||
|
private String remark3; //备注3
|
||||||
|
private String createUser;
|
||||||
|
private Date createTime;
|
||||||
|
private String updateUser;
|
||||||
|
private Date updateTime;
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,30 @@
|
|||||||
|
package com.glxp.api.res.thrsys;
|
||||||
|
|
||||||
|
|
||||||
|
import com.glxp.api.util.page.ListPageRequest;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class ThrUnitMaintainFilterRequest extends ListPageRequest {
|
||||||
|
|
||||||
|
private Integer id;
|
||||||
|
private String key;
|
||||||
|
private String unitId;
|
||||||
|
private String name;
|
||||||
|
private String thirdSys;
|
||||||
|
private String thirdSysFk;
|
||||||
|
|
||||||
|
private String thirdId;
|
||||||
|
private String thirdId1;
|
||||||
|
private String thirdId2;
|
||||||
|
private String thirdId3;
|
||||||
|
private String thirdId4;
|
||||||
|
private String erpId;
|
||||||
|
private Integer corpType;
|
||||||
|
private Integer outType;
|
||||||
|
private Boolean isDownThrSys;
|
||||||
|
private String lastUpdateTime;
|
||||||
|
List<ThrCorpsResponse> thrCorpEntities;
|
||||||
|
}
|
@ -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,35 @@
|
|||||||
|
package com.glxp.api.res.thrsys;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class UdiwmsWarehouseDetail {
|
||||||
|
|
||||||
|
//货位号
|
||||||
|
private String code;
|
||||||
|
|
||||||
|
//货位名称
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
//备注
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
private List<SubWarehouse> subWarehouses;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public static class SubWarehouse {
|
||||||
|
//货位号
|
||||||
|
private String code;
|
||||||
|
|
||||||
|
//货位名称
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
//备注
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@ -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,39 @@
|
|||||||
|
package com.glxp.api.service.thrsys;
|
||||||
|
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import com.glxp.api.entity.thrsys.ThrProductsEntity;
|
||||||
|
import com.glxp.api.req.thrsys.FilterThrProductsRequest;
|
||||||
|
import com.glxp.api.res.thrsys.ThrProductsResponse;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 服务类
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author ${author}
|
||||||
|
* @since 2023-01-10
|
||||||
|
*/
|
||||||
|
public interface ThrProductsService extends IService<ThrProductsEntity> {
|
||||||
|
|
||||||
|
|
||||||
|
ThrProductsEntity selectByCode(String code);
|
||||||
|
|
||||||
|
List<ThrProductsEntity> filterThrProducts(FilterThrProductsRequest filterThrProductsRequest);
|
||||||
|
|
||||||
|
List<ThrProductsEntity> filterThrProducts1(FilterThrProductsRequest filterThrProductsRequest);
|
||||||
|
|
||||||
|
List<ThrProductsResponse> filterJoinThrProducts(FilterThrProductsRequest filterThrProductsRequest);
|
||||||
|
|
||||||
|
ThrProductsEntity selectById(String id);
|
||||||
|
|
||||||
|
boolean deleteById(String id);
|
||||||
|
|
||||||
|
boolean insertThrProducts(ThrProductsEntity thrProductsEntity);
|
||||||
|
|
||||||
|
Boolean isExit(String code, String thirdIdFk);
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,24 @@
|
|||||||
|
package com.glxp.api.service.thrsys;
|
||||||
|
|
||||||
|
import com.glxp.api.common.res.BaseResponse;
|
||||||
|
import com.glxp.api.entity.thrsys.ThrSystemDetailEntity;
|
||||||
|
import com.glxp.api.entity.thrsys.ThrSystemEntity;
|
||||||
|
import com.glxp.api.req.thrsys.FilterBasicThirdSysDetailRequest;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public interface ThrSystemDetailService {
|
||||||
|
|
||||||
|
boolean updateBasicThirdSysDetail(ThrSystemDetailEntity basicThirdSysEntity);
|
||||||
|
|
||||||
|
ThrSystemDetailEntity selectByKey(String key, String thirdSys);
|
||||||
|
|
||||||
|
List<ThrSystemDetailEntity> filterBasicThirdSysDetail(FilterBasicThirdSysDetailRequest filterBasicThirdSysDetailRequest);
|
||||||
|
|
||||||
|
void updateInterfaceStatus(List<ThrSystemDetailEntity> list);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 测试第三方服务连通性
|
||||||
|
*/
|
||||||
|
BaseResponse testThirdService(ThrSystemEntity thrSystemEntity);
|
||||||
|
}
|
@ -1,7 +1,38 @@
|
|||||||
package com.glxp.api.service.thrsys;
|
package com.glxp.api.service.thrsys;
|
||||||
|
|
||||||
import com.glxp.api.entity.thrsys.ThrSystemEntity;
|
import com.glxp.api.entity.thrsys.ThrSystemEntity;
|
||||||
|
import com.glxp.api.req.thrsys.FilterBasicThirdSysRequest;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
public interface ThrSystemService {
|
public interface ThrSystemService {
|
||||||
|
boolean updateBasicThiSys(ThrSystemEntity thrSystemEntity);
|
||||||
|
|
||||||
|
ThrSystemEntity selectByThirdId(String thirdId);
|
||||||
|
|
||||||
|
List<ThrSystemEntity> filterBasicThiSys(FilterBasicThirdSysRequest filterBasicThirdSysRequest);
|
||||||
|
|
||||||
ThrSystemEntity selectMainThrSys();
|
ThrSystemEntity selectMainThrSys();
|
||||||
|
|
||||||
|
ThrSystemEntity selectMainThrSys1(FilterBasicThirdSysRequest filterBasicThirdSysRequest);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 校验第三方系统名称是否重复
|
||||||
|
*
|
||||||
|
* @param thirdId 第三方系统ID
|
||||||
|
* @param thirdName 第三方系统名称
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
boolean selectThirdNameExists(String thirdId, String thirdName);
|
||||||
|
/**
|
||||||
|
* 根据第三方系统ID查询第三方系统名称
|
||||||
|
*
|
||||||
|
* @param thirdId
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
String selectThirdNameByThirdId(@Param("thirdId") String thirdId);
|
||||||
|
|
||||||
|
int countThirdSys(FilterBasicThirdSysRequest filterBasicThirdSysRequest);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -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,117 @@
|
|||||||
|
package com.glxp.api.service.thrsys.impl;
|
||||||
|
|
||||||
|
import cn.hutool.core.collection.CollUtil;
|
||||||
|
import cn.hutool.core.util.StrUtil;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.github.pagehelper.PageHelper;
|
||||||
|
import com.glxp.api.dao.thrsys.ThrProductsDao;
|
||||||
|
import com.glxp.api.entity.thrsys.ThrProductsEntity;
|
||||||
|
import com.glxp.api.req.thrsys.FilterThrProductsRequest;
|
||||||
|
import com.glxp.api.res.thrsys.ThrProductsAddDiResponse;
|
||||||
|
import com.glxp.api.res.thrsys.ThrProductsResponse;
|
||||||
|
import com.glxp.api.service.thrsys.ThrProductsAddDiService;
|
||||||
|
import com.glxp.api.service.thrsys.ThrProductsService;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import java.util.Collections;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 服务实现类
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author ${author}
|
||||||
|
* @since 2023-01-10
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public class ThrProductsServiceImpl extends ServiceImpl<ThrProductsDao, ThrProductsEntity> implements ThrProductsService {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
ThrProductsDao thrProductsDao;
|
||||||
|
@Resource
|
||||||
|
ThrProductsAddDiService thrProductsAddDiService;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ThrProductsEntity selectByCode(String code) {
|
||||||
|
if (StrUtil.isEmpty(code))
|
||||||
|
return null;
|
||||||
|
FilterThrProductsRequest filterThrProductsRequest = new FilterThrProductsRequest();
|
||||||
|
filterThrProductsRequest.setCode(code);
|
||||||
|
List<ThrProductsEntity> thrProductsEntities = thrProductsDao.filterThrProducts(filterThrProductsRequest);
|
||||||
|
if (CollUtil.isNotEmpty(thrProductsEntities)) {
|
||||||
|
return thrProductsEntities.get(0);
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<ThrProductsEntity> filterThrProducts(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<ThrProductsEntity> data = thrProductsDao.filterThrProducts(filterThrProductsRequest);
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<ThrProductsEntity> filterThrProducts1(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<ThrProductsEntity> data = thrProductsDao.filterThrProducts1(filterThrProductsRequest);
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<ThrProductsResponse> filterJoinThrProducts(FilterThrProductsRequest filterThrProductsRequest) {
|
||||||
|
if (filterThrProductsRequest == null) {
|
||||||
|
return Collections.emptyList();
|
||||||
|
}
|
||||||
|
if (filterThrProductsRequest.getPage() != null) {
|
||||||
|
int offset = (filterThrProductsRequest.getPage() - 1) * filterThrProductsRequest.getLimit();
|
||||||
|
PageHelper.offsetPage(offset, filterThrProductsRequest.getLimit());
|
||||||
|
}
|
||||||
|
return thrProductsDao.filterJoinThrProducts(filterThrProductsRequest);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ThrProductsEntity selectById(String id) {
|
||||||
|
return thrProductsDao.selectById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean deleteById(String id) {
|
||||||
|
return thrProductsDao.deleteById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean insertThrProducts(ThrProductsEntity thrProductsEntity) {
|
||||||
|
return thrProductsDao.insertThrProducts(thrProductsEntity);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Boolean isExit(String code, String thirdIdFk) {
|
||||||
|
//判断di表有没有该产品数据
|
||||||
|
FilterThrProductsRequest filterThrProductsRequest = new FilterThrProductsRequest();
|
||||||
|
filterThrProductsRequest.setThirdSysFk(thirdIdFk);
|
||||||
|
filterThrProductsRequest.setCode(code);
|
||||||
|
List<ThrProductsAddDiResponse> filterThrProductsDiList = thrProductsAddDiService.filterThrProductsDiList(filterThrProductsRequest);
|
||||||
|
List<ThrProductsEntity> data = thrProductsDao.selectThrProducts(filterThrProductsRequest);
|
||||||
|
if (CollUtil.isNotEmpty(data) || CollUtil.isNotEmpty(filterThrProductsDiList)) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,65 @@
|
|||||||
|
package com.glxp.api.service.thrsys.impl;
|
||||||
|
|
||||||
|
import com.github.pagehelper.PageHelper;
|
||||||
|
import com.glxp.api.common.res.BaseResponse;
|
||||||
|
import com.glxp.api.dao.thrsys.ThrSystemDetailDao;
|
||||||
|
import com.glxp.api.entity.thrsys.ThrSystemDetailEntity;
|
||||||
|
import com.glxp.api.entity.thrsys.ThrSystemEntity;
|
||||||
|
import com.glxp.api.http.ErpBasicClient;
|
||||||
|
import com.glxp.api.req.thrsys.FilterBasicThirdSysDetailRequest;
|
||||||
|
import com.glxp.api.service.thrsys.ThrSystemDetailService;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import java.util.Collections;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Slf4j
|
||||||
|
@Service
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public class ThrSystemDetailServiceImpl implements ThrSystemDetailService {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
ThrSystemDetailDao thrSystemDetailDao;
|
||||||
|
@Resource
|
||||||
|
private ErpBasicClient erpBasicClient;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean updateBasicThirdSysDetail(ThrSystemDetailEntity basicThirdSysEntity) {
|
||||||
|
return thrSystemDetailDao.updateBasicThirdSysDetail(basicThirdSysEntity);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ThrSystemDetailEntity selectByKey(String key, String thirdSys) {
|
||||||
|
return thrSystemDetailDao.selectByKey(key, thirdSys);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<ThrSystemDetailEntity> filterBasicThirdSysDetail(FilterBasicThirdSysDetailRequest filterBasicThirdSysDetailRequest) {
|
||||||
|
if (filterBasicThirdSysDetailRequest == null) {
|
||||||
|
return Collections.emptyList();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (filterBasicThirdSysDetailRequest.getPage() != null) {
|
||||||
|
int offset = (filterBasicThirdSysDetailRequest.getPage() - 1) * filterBasicThirdSysDetailRequest.getLimit();
|
||||||
|
PageHelper.offsetPage(offset, filterBasicThirdSysDetailRequest.getLimit());
|
||||||
|
}
|
||||||
|
List<ThrSystemDetailEntity> data = thrSystemDetailDao.filterBasicThirdSysDetail(filterBasicThirdSysDetailRequest);
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
@Override
|
||||||
|
public void updateInterfaceStatus(List<ThrSystemDetailEntity> list) {
|
||||||
|
for (ThrSystemDetailEntity thrSystemDetailEntity : list) {
|
||||||
|
thrSystemDetailDao.updateBasicThirdSysDetail(thrSystemDetailEntity);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public BaseResponse testThirdService(ThrSystemEntity thrSystemEntity) {
|
||||||
|
return erpBasicClient.testThridConnect(thrSystemEntity);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,270 @@
|
|||||||
|
<?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,
|
||||||
|
price, selectThridSysStr, basicPrductRemak1,
|
||||||
|
basicPrductRemak2, basicPrductRemak3, basicPrductRemak4,
|
||||||
|
basicPrductRemak5, basicPrductRemak6, basicPrductRemak7,
|
||||||
|
basicPrductRemak8, `name`, spec,
|
||||||
|
registerNo, cplb, flbm,
|
||||||
|
qxlb, tyshxydm, zczbhhzbapzbh,
|
||||||
|
ylqxzcrbarmc, ylqxzcrbarywmc, updateTime,
|
||||||
|
supName, model, `standard`,
|
||||||
|
qtbm, zczyxqz, relId, type)
|
||||||
|
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.price}, #{item.selectThridSysStr}
|
||||||
|
, #{item.basicPrductRemak1}, #{item.basicPrductRemak2}, #{item.basicPrductRemak3},
|
||||||
|
#{item.basicPrductRemak4}
|
||||||
|
, #{item.basicPrductRemak5}, #{item.basicPrductRemak6}, #{item.basicPrductRemak7},
|
||||||
|
#{item.basicPrductRemak8}
|
||||||
|
, #{item.name}, #{item.spec}, #{item.registerNo}, #{item.cplb}
|
||||||
|
, #{item.flbm}, #{item.qxlb}, #{item.tyshxydm}, #{item.zczbhhzbapzbh}
|
||||||
|
, #{item.ylqxzcrbarmc}, #{item.ylqxzcrbarywmc}, #{item.updateTime}, #{item.supName}, #{item.model}
|
||||||
|
, #{item.standard}, #{item.qtbm}, #{item.standard}, #{item.zczyxqz}, #{item.type})
|
||||||
|
</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.*,
|
||||||
|
bc.name companyName
|
||||||
|
FROM thr_products_add_di tdi
|
||||||
|
left join basic_corp bc on tdi.customerId = bc.erpId
|
||||||
|
<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="code != '' and code != null">
|
||||||
|
AND (tdi.sptm = #{code} OR code = #{code} OR tdi.ybbm = #{code})
|
||||||
|
</if>
|
||||||
|
<if test="uuid != '' and uuid != null">
|
||||||
|
AND tdi.uuid = #{uuid}
|
||||||
|
</if>
|
||||||
|
<if test="name != '' and name != null">
|
||||||
|
AND tdi.name like concat('%',#{name},'%')
|
||||||
|
</if>
|
||||||
|
<if test="spec != '' and spec != null">
|
||||||
|
AND tdi.spec = #{spec}
|
||||||
|
</if>
|
||||||
|
<if test="checkStatus != null">
|
||||||
|
AND tdi.status = #{checkStatus}
|
||||||
|
</if>
|
||||||
|
<if test="customerId != '' and customerId != null">
|
||||||
|
AND tdi.customerId = #{customerId}
|
||||||
|
</if>
|
||||||
|
<if test="registerNo != '' and registerNo != null">
|
||||||
|
AND tdi.registerNo = #{registerNo}
|
||||||
|
</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>
|
||||||
|
|
||||||
|
<insert id="insert" keyColumn="id" keyProperty="id"
|
||||||
|
parameterType="com.glxp.api.entity.thrsys.ThrProductsAddDiEntity" useGeneratedKeys="true">
|
||||||
|
<!--@mbg.generated-->
|
||||||
|
insert into thr_products_add_di (uuid, customerId, createTime,
|
||||||
|
auditTime, remark, auditUser,
|
||||||
|
`status`, thirdSysFk, code,
|
||||||
|
sptm, ybbm, measname,
|
||||||
|
manufactory, spmc, cpms,
|
||||||
|
price, selectThridSysStr, basicPrductRemak1,
|
||||||
|
basicPrductRemak2, basicPrductRemak3, basicPrductRemak4,
|
||||||
|
basicPrductRemak5, basicPrductRemak6, basicPrductRemak7,
|
||||||
|
basicPrductRemak8, `name`, spec,
|
||||||
|
registerNo, cplb, flbm,
|
||||||
|
qxlb, tyshxydm, zczbhhzbapzbh,
|
||||||
|
ylqxzcrbarmc, ylqxzcrbarywmc, updateTime,
|
||||||
|
supName, model, `standard`,
|
||||||
|
qtbm, zczyxqz, relId, type)
|
||||||
|
values (#{uuid,jdbcType=VARCHAR}, #{customerId,jdbcType=BIGINT}, #{createTime,jdbcType=TIMESTAMP},
|
||||||
|
#{auditTime,jdbcType=TIMESTAMP}, #{remark,jdbcType=VARCHAR}, #{auditUser,jdbcType=VARCHAR},
|
||||||
|
#{status,jdbcType=INTEGER}, #{thirdSysFk,jdbcType=VARCHAR}, #{code,jdbcType=VARCHAR},
|
||||||
|
#{sptm,jdbcType=VARCHAR}, #{ybbm,jdbcType=VARCHAR}, #{measname,jdbcType=VARCHAR},
|
||||||
|
#{manufactory,jdbcType=VARCHAR}, #{spmc,jdbcType=VARCHAR}, #{cpms,jdbcType=VARCHAR},
|
||||||
|
#{price,jdbcType=VARCHAR}, #{selectThridSysStr,jdbcType=VARCHAR}, #{basicPrductRemak1,jdbcType=VARCHAR},
|
||||||
|
#{basicPrductRemak2,jdbcType=VARCHAR}, #{basicPrductRemak3,jdbcType=VARCHAR},
|
||||||
|
#{basicPrductRemak4,jdbcType=VARCHAR},
|
||||||
|
#{basicPrductRemak5,jdbcType=VARCHAR}, #{basicPrductRemak6,jdbcType=VARCHAR},
|
||||||
|
#{basicPrductRemak7,jdbcType=VARCHAR},
|
||||||
|
#{basicPrductRemak8,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{spec,jdbcType=VARCHAR},
|
||||||
|
#{registerNo,jdbcType=VARCHAR}, #{cplb,jdbcType=VARCHAR}, #{flbm,jdbcType=VARCHAR},
|
||||||
|
#{qxlb,jdbcType=VARCHAR}, #{tyshxydm,jdbcType=VARCHAR}, #{zczbhhzbapzbh,jdbcType=VARCHAR},
|
||||||
|
#{ylqxzcrbarmc,jdbcType=VARCHAR}, #{ylqxzcrbarywmc,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP},
|
||||||
|
#{supName,jdbcType=VARCHAR}, #{model,jdbcType=VARCHAR}, #{standard,jdbcType=VARCHAR},
|
||||||
|
#{qtbm,jdbcType=VARCHAR}, #{zczyxqz,jdbcType=VARCHAR}, #{relId,jdbcType=VARCHAR},
|
||||||
|
#{type,jdbcType=VARCHAR})
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
<select id="filterThrProductsDiList" parameterType="com.glxp.api.req.thrsys.FilterThrProductsRequest"
|
||||||
|
resultType="com.glxp.api.res.thrsys.ThrProductsAddDiResponse">
|
||||||
|
SELECT tdi.*
|
||||||
|
FROM thr_products_add_di tdi
|
||||||
|
<where>
|
||||||
|
<if test="thirdSysFk != null">
|
||||||
|
AND tdi.thirdSysFk = #{thirdSysFk}
|
||||||
|
</if>
|
||||||
|
<if test="code != null">
|
||||||
|
AND tdi.code = #{code}
|
||||||
|
</if>
|
||||||
|
<if test="status != null">
|
||||||
|
AND tdi.status = #{status}
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
</select><select id="filterThrProductsDiLists" parameterType="com.glxp.api.req.thrsys.FilterThrProductsRequest"
|
||||||
|
resultType="com.glxp.api.entity.thrsys.ThrProductsAddDiEntity">
|
||||||
|
SELECT tdi.*
|
||||||
|
FROM thr_products_add_di tdi
|
||||||
|
<where>
|
||||||
|
<if test="thirdSysFk != null">
|
||||||
|
AND tdi.thirdSysFk = #{thirdSysFk}
|
||||||
|
</if>
|
||||||
|
<if test="code != null">
|
||||||
|
AND tdi.code = #{code}
|
||||||
|
</if>
|
||||||
|
<if test="status != null">
|
||||||
|
AND tdi.status = #{status}
|
||||||
|
</if>
|
||||||
|
<if test="diType != null">
|
||||||
|
AND updateTime <= "2023-04-5 00:00:00"
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
</mapper>
|
@ -0,0 +1,47 @@
|
|||||||
|
<?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.ThrSystemDetailDao">
|
||||||
|
|
||||||
|
<update id="updateBasicThirdSysDetail" parameterType="com.glxp.api.entity.thrsys.ThrSystemDetailEntity">
|
||||||
|
UPDATE thr_system_detail
|
||||||
|
<trim prefix="set" suffixOverrides=",">
|
||||||
|
<if test="value != null">value=#{value},</if>
|
||||||
|
<if test="enabled != null">enabled=#{enabled},</if>
|
||||||
|
<if test="itrCache != null">itrCache=#{itrCache},</if>
|
||||||
|
<if test="guideUrl != null">guideUrl=#{guideUrl},</if>
|
||||||
|
<if test="remark != null">remark=#{remark},</if>
|
||||||
|
<if test="name != null">name=#{name},</if>
|
||||||
|
<if test="fromType != null">fromType=#{fromType},</if>
|
||||||
|
<if test="thirdSysFk != null">thirdSysFk=#{thirdSysFk},</if>
|
||||||
|
</trim>
|
||||||
|
WHERE id=#{id}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<select id="filterBasicThirdSysDetail" parameterType="com.glxp.api.req.thrsys.FilterBasicThirdSysRequest"
|
||||||
|
resultType="com.glxp.api.entity.thrsys.ThrSystemDetailEntity">
|
||||||
|
SELECT *
|
||||||
|
FROM thr_system_detail
|
||||||
|
<where>
|
||||||
|
<if test="key != '' and key != null">
|
||||||
|
AND thr_system_detail.key = #{key}
|
||||||
|
</if>
|
||||||
|
<if test="thirdSysFk != '' and thirdSysFk != null">
|
||||||
|
AND thirdSysFk = #{thirdSysFk}
|
||||||
|
</if>
|
||||||
|
<if test="enabled != null">
|
||||||
|
AND enabled = #{enabled}
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
order by id
|
||||||
|
</select>
|
||||||
|
<select id="selectByKey" parameterType="Map"
|
||||||
|
resultType="com.glxp.api.entity.thrsys.ThrSystemDetailEntity">
|
||||||
|
select thr_system_detail.*, thr_system.thridUrl
|
||||||
|
FROM thr_system_detail
|
||||||
|
inner join thr_system on thr_system_detail.thirdSysFk = thr_system.thirdId
|
||||||
|
WHERE thr_system_detail.key = #{key}
|
||||||
|
and thr_system_detail.thirdSysFk = #{thirdSys}
|
||||||
|
and thr_system.enabled = 1
|
||||||
|
</select>
|
||||||
|
</mapper>
|
Loading…
Reference in New Issue