自助平台代码同步

feature-order-fix
anthonyywj2 3 years ago
parent b9b19c6808
commit 37dfdc87a3

@ -501,17 +501,20 @@ public class StockOrderDetailController {
companyProductRelevanceRequest.setUnitFk(companyProductRelevanceRequest.getCorpId()); companyProductRelevanceRequest.setUnitFk(companyProductRelevanceRequest.getCorpId());
basicInstrumentMaintainRelevanceResponses = companyProductRelevanceService.filterUdiGp(companyProductRelevanceRequest); basicInstrumentMaintainRelevanceResponses = companyProductRelevanceService.filterUdiGp(companyProductRelevanceRequest);
} else { } else {
List<UdiRelevanceResponse> udiRelevanceResponses = udiRelevanceService.filterUdiGp(filterUdiInfoRequest); // List<UdiRelevanceResponse> udiRelevanceResponses = udiRelevanceService.filterUdiGp(filterUdiInfoRequest);
pageInfo2 = new PageInfo<>(udiRelevanceResponses); // pageInfo2 = new PageInfo<>(udiRelevanceResponses);
if (!pageInfo2.getList().isEmpty()) { // if (!pageInfo2.getList().isEmpty()) {
basicInstrumentMaintainRelevanceResponses = new ArrayList<>(pageInfo2.getList().size()); // basicInstrumentMaintainRelevanceResponses = new ArrayList<>(pageInfo2.getList().size());
for (UdiRelevanceResponse udiRelevanceResponse : pageInfo2.getList()) { // for (UdiRelevanceResponse udiRelevanceResponse : pageInfo2.getList()) {
CompanyProductRelevanceResponse companyProductRelevanceResponse = new CompanyProductRelevanceResponse(); // CompanyProductRelevanceResponse companyProductRelevanceResponse = new CompanyProductRelevanceResponse();
BeanUtils.copyProperties(udiRelevanceResponse, companyProductRelevanceResponse); // BeanUtils.copyProperties(udiRelevanceResponse, companyProductRelevanceResponse);
companyProductRelevanceResponse.setRlId(udiRelevanceResponse.getId()); // companyProductRelevanceResponse.setRlId(udiRelevanceResponse.getId());
basicInstrumentMaintainRelevanceResponses.add(companyProductRelevanceResponse); // basicInstrumentMaintainRelevanceResponses.add(companyProductRelevanceResponse);
} // }
} // }
companyProductRelevanceRequest.setCustomerId(null);
basicInstrumentMaintainRelevanceResponses = companyProductRelevanceService.filterUdiGp(companyProductRelevanceRequest);
} }
PageInfo<CompanyProductRelevanceResponse> pageInfo; PageInfo<CompanyProductRelevanceResponse> pageInfo;
pageInfo = new PageInfo<>(basicInstrumentMaintainRelevanceResponses); pageInfo = new PageInfo<>(basicInstrumentMaintainRelevanceResponses);

@ -10,13 +10,16 @@ import com.glxp.api.admin.entity.info.CompanyEntity;
import com.glxp.api.admin.exception.JsonException; import com.glxp.api.admin.exception.JsonException;
import com.glxp.api.admin.req.basic.CompanyProductRelevanceRequest; import com.glxp.api.admin.req.basic.CompanyProductRelevanceRequest;
import com.glxp.api.admin.req.basic.FilterCompanyProductRelevanceRequest; import com.glxp.api.admin.req.basic.FilterCompanyProductRelevanceRequest;
import com.glxp.api.admin.req.basic.FilterUdiInfoRequest;
import com.glxp.api.admin.req.basic.UdiInfoExportRequest; import com.glxp.api.admin.req.basic.UdiInfoExportRequest;
import com.glxp.api.admin.req.info.CompanyRequest; import com.glxp.api.admin.req.info.CompanyRequest;
import com.glxp.api.admin.req.info.DeleteCompanyFileRequest; import com.glxp.api.admin.req.info.DeleteCompanyFileRequest;
import com.glxp.api.admin.res.PageSimpleResponse; import com.glxp.api.admin.res.PageSimpleResponse;
import com.glxp.api.admin.res.basic.UdiRelevanceResponse;
import com.glxp.api.admin.res.info.CompanyProductRelevanceResponse; import com.glxp.api.admin.res.info.CompanyProductRelevanceResponse;
import com.glxp.api.admin.service.auth.AuthAdminService; import com.glxp.api.admin.service.auth.AuthAdminService;
import com.glxp.api.admin.service.basic.BasicUnitMaintainService; import com.glxp.api.admin.service.basic.BasicUnitMaintainService;
import com.glxp.api.admin.service.basic.UdiRelevanceService;
import com.glxp.api.admin.service.info.CompanyProductRelevanceService; import com.glxp.api.admin.service.info.CompanyProductRelevanceService;
import com.glxp.api.admin.service.info.CompanyService; import com.glxp.api.admin.service.info.CompanyService;
import com.glxp.api.admin.thread.CompanyProductsRelService; import com.glxp.api.admin.thread.CompanyProductsRelService;
@ -50,6 +53,9 @@ public class CompanyProductRelevanceController {
@Resource @Resource
private BasicUnitMaintainService basicUnitMaintainService; private BasicUnitMaintainService basicUnitMaintainService;
@Resource
private UdiRelevanceService udiRelevanceService;
@AuthRuleAnnotation("") @AuthRuleAnnotation("")
@GetMapping("/sale/info/company/product/relevance/filter") @GetMapping("/sale/info/company/product/relevance/filter")
public BaseResponse filterCompanyProductRelevance(CompanyProductRelevanceRequest companyProductRelevanceRequest, public BaseResponse filterCompanyProductRelevance(CompanyProductRelevanceRequest companyProductRelevanceRequest,
@ -58,6 +64,17 @@ public class CompanyProductRelevanceController {
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, bindingResult.getFieldError().getDefaultMessage()); return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, bindingResult.getFieldError().getDefaultMessage());
} }
if (StrUtil.isNotEmpty(companyProductRelevanceRequest.getUnionCode())) {
FilterUdiInfoRequest filterUdiInfoRequest = new FilterUdiInfoRequest();
filterUdiInfoRequest.setNameCode(companyProductRelevanceRequest.getUnionCode());
List<UdiRelevanceResponse> temps = udiRelevanceService.filterUdiGp(filterUdiInfoRequest);
if (temps != null && temps.size() > 0) {
companyProductRelevanceRequest.setUuid(temps.get(0).getUuid());
companyProductRelevanceRequest.setNameCode(null);
companyProductRelevanceRequest.setUnionCode(null);
}
}
List<CompanyProductRelevanceResponse> basicInstrumentMaintainRelevanceResponses = null; List<CompanyProductRelevanceResponse> basicInstrumentMaintainRelevanceResponses = null;
companyProductRelevanceRequest.setDiType(1); companyProductRelevanceRequest.setDiType(1);
basicInstrumentMaintainRelevanceResponses = companyProductRelevanceService.filterUdiGp(companyProductRelevanceRequest); basicInstrumentMaintainRelevanceResponses = companyProductRelevanceService.filterUdiGp(companyProductRelevanceRequest);
@ -153,8 +170,8 @@ public class CompanyProductRelevanceController {
@AuthRuleAnnotation("") @AuthRuleAnnotation("")
@PostMapping("/sale/info/insertFilter") @PostMapping("/sale/info/insertFilter")
public BaseResponse insertFilter(@RequestBody UdiInfoExportRequest udiInfoExportRequest) { public BaseResponse insertFilter(@RequestBody UdiInfoExportRequest udiInfoExportRequest) {
if(StrUtil.isEmpty(udiInfoExportRequest.getUnitFk())){ if (StrUtil.isEmpty(udiInfoExportRequest.getUnitFk())) {
return ResultVOUtils.error(500,"未选择供应商!"); return ResultVOUtils.error(500, "未选择供应商!");
} }
companyProductsRelService.insertCompanyProducts(udiInfoExportRequest); companyProductsRelService.insertCompanyProducts(udiInfoExportRequest);
return ResultVOUtils.success("后台正在导入,请稍后刷新查看!"); return ResultVOUtils.success("后台正在导入,请稍后刷新查看!");

@ -1,6 +1,7 @@
package com.glxp.api.admin.controller.purchase; package com.glxp.api.admin.controller.purchase;
import cn.hutool.core.collection.CollUtil; import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.util.StrUtil;
import com.github.pagehelper.PageInfo; import com.github.pagehelper.PageInfo;
import com.glxp.api.admin.annotation.AuthRuleAnnotation; import com.glxp.api.admin.annotation.AuthRuleAnnotation;
import com.glxp.api.admin.annotation.RepeatSubmit; import com.glxp.api.admin.annotation.RepeatSubmit;
@ -27,6 +28,7 @@ import com.glxp.api.admin.util.OrderNoTypeBean;
import com.glxp.api.common.res.BaseResponse; import com.glxp.api.common.res.BaseResponse;
import com.glxp.api.common.util.ResultVOUtils; import com.glxp.api.common.util.ResultVOUtils;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.BeanUtils; import org.springframework.beans.BeanUtils;
import org.springframework.validation.annotation.Validated; import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
@ -91,6 +93,7 @@ public class PurApplyController {
for (StockOrderDetailEntity stockOrderDetailEntity : postPurApplyRequest.getSubErpOrders()) { for (StockOrderDetailEntity stockOrderDetailEntity : postPurApplyRequest.getSubErpOrders()) {
PurApplyDetailEntity purApplyDetailEntity = new PurApplyDetailEntity(); PurApplyDetailEntity purApplyDetailEntity = new PurApplyDetailEntity();
BeanUtils.copyProperties(stockOrderDetailEntity, purApplyDetailEntity); BeanUtils.copyProperties(stockOrderDetailEntity, purApplyDetailEntity);
purApplyDetailEntity.setCount(stockOrderDetailEntity.getCount());
purApplyDetailEntity.setOrderIdFk(purApplyEntity.getId() + ""); purApplyDetailEntity.setOrderIdFk(purApplyEntity.getId() + "");
purApplyDetailService.insert(purApplyDetailEntity); purApplyDetailService.insert(purApplyDetailEntity);
} }
@ -159,15 +162,15 @@ public class PurApplyController {
purApplyService.update(purApplyEntity); purApplyService.update(purApplyEntity);
//审核通过后转换成采购计划单 //审核通过后转换成采购计划单
if (purApplyEntity.getStatus() == ConstantStatus.APPLY_AUDIT_ED) { if (purApplyEntity.getStatus() == ConstantStatus.APPLY_AUDIT_ED && StrUtil.isNotEmpty(purApplyEntity.getTargetBillType())) {
PurPlanEntity purPlanEntity = new PurPlanEntity(); PurPlanEntity purPlanEntity = new PurPlanEntity();
String billNo = gennerOrderUtils.createStOrderNo(new OrderNoTypeBean(Constant.JH_ORDER, "yyyyMMdd")); String billNo = gennerOrderUtils.createStOrderNo(new OrderNoTypeBean(Constant.JH_ORDER, "yyyyMMdd"));
purPlanEntity.setBillNo(billNo); purPlanEntity.setBillNo(billNo);
purPlanEntity.setBillDate(new Date()); purPlanEntity.setBillDate(new Date());
purPlanEntity.setStatus(ConstantStatus.APPLY_UN_AUDIT); purPlanEntity.setStatus(ConstantStatus.APPLY_UN_AUDIT);
purPlanEntity.setLocStorageCode(purApplyEntity.getLocStorageCode()); purPlanEntity.setLocStorageCode(purApplyEntity.getTargetInv());
purPlanEntity.setInvWarehouseCode(purApplyEntity.getInvWarehouseCode()); purPlanEntity.setInvWarehouseCode(purApplyEntity.getTargetSubInv());
purPlanEntity.setBillType(purApplyEntity.getTargetBillType());
purPlanEntity.setDeptCode(purApplyEntity.getDeptCode()); purPlanEntity.setDeptCode(purApplyEntity.getDeptCode());
purPlanEntity.setCreateBy(purApplyEntity.getAuditBy()); purPlanEntity.setCreateBy(purApplyEntity.getAuditBy());
purPlanEntity.setCreateTime(new Date()); purPlanEntity.setCreateTime(new Date());

@ -172,9 +172,9 @@ public class PurPlanController {
List<PurPlanDetailEntity> purPlanDetailEntities = purPlanDetailService.findByOrderId(purApplyEntity.getId() + ""); List<PurPlanDetailEntity> purPlanDetailEntities = purPlanDetailService.findByOrderId(purApplyEntity.getId() + "");
BasicBusTypeChangeEntity basicBusTypeChangeEntity = basicBusTypeChangeService.findByAction(purApplyEntity.getBillType());
//转换成业务单据 //转换成业务单据
if (postPurPlanRequest.getEditStatus() == ConstantStatus.APPLY_AUDIT_ED) { if (postPurPlanRequest.getEditStatus() == ConstantStatus.APPLY_AUDIT_ED && basicBusTypeChangeEntity != null && basicBusTypeChangeEntity.getTargetBusAction() != null) {
if (CollUtil.isNotEmpty(purPlanDetailEntities)) { if (CollUtil.isNotEmpty(purPlanDetailEntities)) {
//1.根据供应商分组 //1.根据供应商分组
@ -204,8 +204,6 @@ public class PurPlanController {
stockOrderEntity.setCorpName(basicUnitMaintainEntity.getName()); stockOrderEntity.setCorpName(basicUnitMaintainEntity.getName());
stockOrderEntity.setBilldate(DateUtil.formatDateTime(new Date())); stockOrderEntity.setBilldate(DateUtil.formatDateTime(new Date()));
stockOrderEntity.setStatus(ConstantStatus.SORDER_ALLOC); stockOrderEntity.setStatus(ConstantStatus.SORDER_ALLOC);
//todo
BasicBusTypeChangeEntity basicBusTypeChangeEntity = basicBusTypeChangeService.findByAction("purplan");
stockOrderEntity.setBillType(basicBusTypeChangeEntity.getTargetBusAction()); stockOrderEntity.setBillType(basicBusTypeChangeEntity.getTargetBusAction());
stockOrderEntity.setInvWarehouseCode(purApplyEntity.getInvWarehouseCode()); stockOrderEntity.setInvWarehouseCode(purApplyEntity.getInvWarehouseCode());
stockOrderEntity.setLocStorageCode(purApplyEntity.getLocStorageCode()); stockOrderEntity.setLocStorageCode(purApplyEntity.getLocStorageCode());

@ -147,15 +147,18 @@ public class SupCertController {
if (postSupCertRequest.getType() == ConstantStatus.CERT_COMPANY) { if (postSupCertRequest.getType() == ConstantStatus.CERT_COMPANY) {
SupCompanyEntity supCompanyEntity = supCompanyService.findCompany(supCertEntity.getCustomerId()); SupCompanyEntity supCompanyEntity = supCompanyService.findCompany(supCertEntity.getCustomerId());
supCompanyEntity.setAuditStatus(ConstantStatus.AUDIT_CHANGE); supCompanyEntity.setAuditStatus(ConstantStatus.AUDIT_CHANGE);
supCompanyEntity.setUpdateTime(new Date());
supCompanyService.modifyCompany(supCompanyEntity); supCompanyService.modifyCompany(supCompanyEntity);
} else if (postSupCertRequest.getType() == ConstantStatus.CERT_MANUFACTURER) { } else if (postSupCertRequest.getType() == ConstantStatus.CERT_MANUFACTURER) {
SupManufacturerEntity supManufacturerEntity = supManufacturerService.findManufacturer(supCertEntity.getManufacturerIdFk()); SupManufacturerEntity supManufacturerEntity = supManufacturerService.findManufacturer(supCertEntity.getManufacturerIdFk());
supManufacturerEntity.setAuditStatus(ConstantStatus.AUDIT_CHANGE); supManufacturerEntity.setAuditStatus(ConstantStatus.AUDIT_CHANGE);
supManufacturerEntity.setUpdateTime(new Date());
supManufacturerService.modifyCompany(supManufacturerEntity); supManufacturerService.modifyCompany(supManufacturerEntity);
} else if (postSupCertRequest.getType() == ConstantStatus.CERT_PRODUCT) { } else if (postSupCertRequest.getType() == ConstantStatus.CERT_PRODUCT) {
SupProductResponse supProductResponse = supProductService.findByProductId(supCertEntity.getProductIdFk()); SupProductResponse supProductResponse = supProductService.findByProductId(supCertEntity.getProductIdFk());
SupProductEntity supProductEntity = new SupProductEntity(); SupProductEntity supProductEntity = new SupProductEntity();
supProductEntity.setId(supProductResponse.getId()); supProductEntity.setId(supProductResponse.getId());
supProductEntity.setUpdateTime(new Date());
supProductEntity.setAuditStatus(ConstantStatus.AUDIT_CHANGE); supProductEntity.setAuditStatus(ConstantStatus.AUDIT_CHANGE);
supProductService.modifyRegistration(supProductEntity); supProductService.modifyRegistration(supProductEntity);
} }

@ -90,8 +90,8 @@ public class SupManufacturerController {
@AuthRuleAnnotation("") @AuthRuleAnnotation("")
@PostMapping("/sup/manufacturer/addCompany") @PostMapping("/sup/manufacturer/addCompany")
public BaseResponse addCompany(@RequestBody SupManufacturerEntity supManufacturerEntity) { public BaseResponse addCompany(@RequestBody SupManufacturerEntity supManufacturerEntity) {
supManufacturerEntity.setCreateDate(new Date()); supManufacturerEntity.setCreateTime(new Date());
supManufacturerEntity.setUpdateDate(new Date()); supManufacturerEntity.setUpdateTime(new Date());
boolean b = supManufacturerService.insertCompany(supManufacturerEntity); boolean b = supManufacturerService.insertCompany(supManufacturerEntity);
if (b) { if (b) {
return ResultVOUtils.success("添加成功"); return ResultVOUtils.success("添加成功");
@ -163,7 +163,7 @@ public class SupManufacturerController {
} }
supManufacturerEntity.setUpdateDate(new Date()); supManufacturerEntity.setUpdateTime(new Date());
SupManufacturerEntity originEntity = supManufacturerService.findManufacturer(supManufacturerEntity.getManufacturerId()); SupManufacturerEntity originEntity = supManufacturerService.findManufacturer(supManufacturerEntity.getManufacturerId());
boolean b = supManufacturerService.modifyCompany(supManufacturerEntity); boolean b = supManufacturerService.modifyCompany(supManufacturerEntity);
//修改证书对应的供应商ID生产企业ID //修改证书对应的供应商ID生产企业ID
@ -202,7 +202,7 @@ public class SupManufacturerController {
} }
} }
supManufacturerEntity.setUpdateDate(new Date()); supManufacturerEntity.setUpdateTime(new Date());
SupManufacturerEntity originEntity = supManufacturerService.findCompany(supManufacturerEntity.getId()); SupManufacturerEntity originEntity = supManufacturerService.findCompany(supManufacturerEntity.getId());
boolean b = supManufacturerService.modifyCompany(supManufacturerEntity); boolean b = supManufacturerService.modifyCompany(supManufacturerEntity);
//修改证书对应的供应商ID生产企业ID //修改证书对应的供应商ID生产企业ID

@ -104,8 +104,8 @@ public class SupProductController {
@AuthRuleAnnotation("") @AuthRuleAnnotation("")
@PostMapping("/sup/product/addRegistration") @PostMapping("/sup/product/addRegistration")
public BaseResponse addRegistration(@RequestBody SupProductEntity supProductEntity) { public BaseResponse addRegistration(@RequestBody SupProductEntity supProductEntity) {
supProductEntity.setCreate_date(new Date()); supProductEntity.setCreateTime(new Date());
supProductEntity.setUpdate_date(new Date()); supProductEntity.setUpdateTime(new Date());
boolean b = supProductService.insertRegistration(supProductEntity); boolean b = supProductService.insertRegistration(supProductEntity);
if (b) { if (b) {
return ResultVOUtils.success("添加成功"); return ResultVOUtils.success("添加成功");
@ -132,8 +132,8 @@ public class SupProductController {
supProductEntity.setProductDirectoryCode(udiRelevanceResponse.getFlbm()); supProductEntity.setProductDirectoryCode(udiRelevanceResponse.getFlbm());
supProductEntity.setRecordPeopleName(udiRelevanceResponse.getYlqxzcrbarmc()); supProductEntity.setRecordPeopleName(udiRelevanceResponse.getYlqxzcrbarmc());
supProductEntity.setSpecification(udiRelevanceResponse.getGgxh()); supProductEntity.setSpecification(udiRelevanceResponse.getGgxh());
supProductEntity.setCreate_date(new Date()); supProductEntity.setCreateTime(new Date());
supProductEntity.setUpdate_date(new Date()); supProductEntity.setUpdateTime(new Date());
supProductEntity.setManufacturerIdFk(selectProductBindRequest.getManufacturerId()); supProductEntity.setManufacturerIdFk(selectProductBindRequest.getManufacturerId());
supProductEntity.setCustomerId(selectProductBindRequest.getCustomerId()); supProductEntity.setCustomerId(selectProductBindRequest.getCustomerId());
supProductEntity.setHchzsb(udiRelevanceResponse.getCplb()); supProductEntity.setHchzsb(udiRelevanceResponse.getCplb());
@ -206,7 +206,7 @@ public class SupProductController {
} }
} }
supProductEntity.setUpdate_date(new Date()); supProductEntity.setUpdateTime(new Date());
SupProductResponse originEntity = supProductService.findByProductId(supProductEntity.getProductId()); SupProductResponse originEntity = supProductService.findByProductId(supProductEntity.getProductId());
supCertService.updateProductId(originEntity.getCustomerId(), supProductEntity.getCustomerId(), originEntity.getManufacturerIdFk(), supCertService.updateProductId(originEntity.getCustomerId(), supProductEntity.getCustomerId(), originEntity.getManufacturerIdFk(),
supProductEntity.getManufacturerIdFk(), originEntity.getProductId(), supProductEntity.getProductId()); supProductEntity.getManufacturerIdFk(), originEntity.getProductId(), supProductEntity.getProductId());
@ -249,7 +249,7 @@ public class SupProductController {
} }
supProductEntity.setUpdate_date(new Date()); supProductEntity.setUpdateTime(new Date());
boolean b = supProductService.modifyRegistration(supProductEntity); boolean b = supProductService.modifyRegistration(supProductEntity);
// if (supProductEntity.getAuditStatus() == ConstantStatus.AUDIT_PASS) { // if (supProductEntity.getAuditStatus() == ConstantStatus.AUDIT_PASS) {

@ -20,7 +20,7 @@ public interface PurPlanDetailDao {
Boolean update(PurPlanDetailEntity purPlanDetailRequest); Boolean update(PurPlanDetailEntity purPlanDetailRequest);
Boolean deleteByIds(List<Long> ids); Boolean deleteByIds(@Param("ids")List<Long> ids);
Boolean deleteByOrderId(@Param("orderIdFk") String orderIdFk); Boolean deleteByOrderId(@Param("orderIdFk") String orderIdFk);

@ -19,6 +19,8 @@ public interface SupProductDao {
boolean modifyRegistration(SupProductEntity supProductEntity); boolean modifyRegistration(SupProductEntity supProductEntity);
List<SupProductEntity> filterProducts(FilterPoductRequest filterPoductRequest);
boolean insertRegistration(SupProductEntity supProductEntity); boolean insertRegistration(SupProductEntity supProductEntity);
boolean deleteById(@Param("id") String id); boolean deleteById(@Param("id") String id);

@ -32,4 +32,7 @@ public class SyncDataSetEntity {
private Integer orderSyncTime; private Integer orderSyncTime;
private Integer orderSyncDlTime; private Integer orderSyncDlTime;
private boolean unCheckCert;
private boolean checkedCert;
} }

@ -35,7 +35,7 @@ public class PurApplyEntity {
/** /**
* *
*/ */
private Long billType; private String billType;
/** /**
* *
*/ */
@ -72,4 +72,8 @@ public class PurApplyEntity {
private String auditRemark; private String auditRemark;
private String targetInv;
private String targetSubInv;
private String targetBillType;
} }

@ -38,7 +38,7 @@ public class PurPlanEntity {
/** /**
* *
*/ */
private Integer billType; private String billType;
/** /**
* *
*/ */

@ -28,8 +28,8 @@ public class SupManufacturerEntity {
private String productionRecordSection; private String productionRecordSection;
private Date productionRecordDate; private Date productionRecordDate;
private String remark; private String remark;
private Date createDate; private Date createTime;
private Date updateDate; private Date updateTime;
private String customerId; private String customerId;
private String manufacturerId; private String manufacturerId;

@ -38,8 +38,8 @@ public class SupProductEntity {
private String filePath; private String filePath;
private String remark; private String remark;
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date create_date; private Date createTime;
private Date update_date; private Date updateTime;
private String newFilePath; private String newFilePath;
private String newInstructions; private String newInstructions;

@ -13,4 +13,6 @@ public class FilterSupCertRequest extends ListPageRequest {
private String productIdFk; private String productIdFk;
private Integer auditStatus; private Integer auditStatus;
private Integer type; private Integer type;
private String lastUpdateTime;
} }

@ -11,8 +11,8 @@ public class FilterSupCompanyRequest extends ListPageRequest {
private String customerId; private String customerId;
private String companyName; private String companyName;
private String creditNum; private String creditNum;
private String auditStatus; private Integer auditStatus;
private String unitIdFk; private String unitIdFk;
private String lastUpdateTime;
private List<String> auditStatusList; private List<String> auditStatusList;
} }

@ -45,7 +45,7 @@ public class PurApplyRequest extends ListPageRequest {
* *
*/ */
@NotNull(message = "申购类型不能为空") @NotNull(message = "申购类型不能为空")
private Integer billType; private String billType;
/** /**
* *
@ -93,6 +93,8 @@ public class PurApplyRequest extends ListPageRequest {
*/ */
private Date createTime; private Date createTime;
private String targetInv;
private String targetSubInv;
private String targetBillType;
} }

@ -30,6 +30,7 @@ public class FilterThrProductsRequest extends ListPageRequest {
private Long id; private Long id;
private String uuid; private String uuid;
private Integer diType;
} }

@ -18,6 +18,6 @@ public class BasicUnitMaintainResponse {
private String mobile; private String mobile;
private String thirdName; private String thirdName;
private String unitId; private String unitId;
private int corpType; private Integer corpType;
private int outType; private Integer outType;
} }

@ -8,6 +8,10 @@ import com.glxp.api.admin.entity.inout.WarehouseUserEntity;
import com.glxp.api.admin.entity.inventory.InvBusUserEntity; import com.glxp.api.admin.entity.inventory.InvBusUserEntity;
import com.glxp.api.admin.entity.inventory.InvSubWarehouseEntity; import com.glxp.api.admin.entity.inventory.InvSubWarehouseEntity;
import com.glxp.api.admin.entity.inventory.InvWarehouseEntity; import com.glxp.api.admin.entity.inventory.InvWarehouseEntity;
import com.glxp.api.admin.entity.purchase.SupCertEntity;
import com.glxp.api.admin.entity.purchase.SupCompanyEntity;
import com.glxp.api.admin.entity.purchase.SupManufacturerEntity;
import com.glxp.api.admin.entity.purchase.SupProductEntity;
import com.glxp.api.admin.entity.thrsys.*; import com.glxp.api.admin.entity.thrsys.*;
import lombok.Data; import lombok.Data;
@ -46,4 +50,10 @@ public class SpsSyncDataResponse {
//新增配送产品信息 //新增配送产品信息
List<NewUploadDiEntity> newUploadDiEntities; List<NewUploadDiEntity> newUploadDiEntities;
//资质证书
List<SupCompanyEntity> supCompanyEntities;
List<SupManufacturerEntity> supManufacturerEntities;
List<SupProductEntity> supProductEntities;
List<SupCertEntity> supCertEntities;
} }

@ -37,4 +37,8 @@ public class SyncDataSetResponse {
private Integer orderSyncDlTime; private Integer orderSyncDlTime;
private Integer delaySyncTime; private Integer delaySyncTime;
private boolean unCheckCert;
private boolean checkedCert;
} }

@ -27,7 +27,7 @@ public class PurApplyResponse {
/** /**
* *
*/ */
private Long billType; private String billType;
/** /**
* *
*/ */

@ -26,7 +26,7 @@ public class PurPlanResponse {
/** /**
* *
*/ */
private Integer billType; private String billType;
/** /**
* *
*/ */

@ -21,6 +21,8 @@ public interface SupProductService {
List<SupProductResponse> getRegistration(FilterPoductRequest filterPoductRequest); List<SupProductResponse> getRegistration(FilterPoductRequest filterPoductRequest);
List<SupProductEntity> filterProducts(FilterPoductRequest filterPoductRequest);
boolean modifyRegistration(SupProductEntity supProductEntity); boolean modifyRegistration(SupProductEntity supProductEntity);
boolean insertRegistration(SupProductEntity supProductEntity); boolean insertRegistration(SupProductEntity supProductEntity);

@ -85,6 +85,19 @@ public class SupProductServiceImpl implements SupProductService {
return companyEntities; return companyEntities;
} }
@Override
public List<SupProductEntity> filterProducts(FilterPoductRequest filterPoductRequest) {
if (filterPoductRequest == null) {
return Collections.emptyList();
}
if (filterPoductRequest.getPage() != null) {
int offset = (filterPoductRequest.getPage() - 1) * filterPoductRequest.getLimit();
PageHelper.offsetPage(offset, filterPoductRequest.getLimit());
}
List<SupProductEntity> supProductEntities = supProductDao.filterProducts(filterPoductRequest);
return supProductEntities;
}
@Override @Override
public boolean modifyRegistration(SupProductEntity companyEntity) { public boolean modifyRegistration(SupProductEntity companyEntity) {
return supProductDao.modifyRegistration(companyEntity); return supProductDao.modifyRegistration(companyEntity);

@ -11,12 +11,13 @@
</select> </select>
<insert id="insert" parameterType="com.glxp.api.admin.entity.info.SyncDataSetEntity"> <insert id="insert" parameterType="com.glxp.sale.admin.entity.param.SyncDataSetEntity">
replace replace
INTO sync_data_set(id,typeBus, typeScan, INTO sync_data_set(id,typeBus, typeScan,
typeThird, basicProducts, basicCorp, basicInv, basicThirdProducts, basicThirdCorp, basicThirdInv typeThird, basicProducts, basicCorp, basicInv, basicThirdProducts, basicThirdCorp, basicThirdInv
, basicThirdBusOrder, orderScanFinish, dbDiProducts,downstreamEnable,syncTime, syncDownloadTime, , basicThirdBusOrder, orderScanFinish, dbDiProducts,downstreamEnable,syncTime,
orderUnReceive,orderUnCheck,busTypes,syncIp,sysUser,entrustAction,orderSyncTime,orderSyncDlTime) orderUnReceive,orderUnCheck,busTypes,sysUser,orderSyncTime,orderSyncStart,basicSyncStart,entrustAction
,unCheckCert,checkedCert)
values ( values (
#{id}, #{id},
#{typeBus}, #{typeBus},
@ -33,17 +34,17 @@
#{dbDiProducts}, #{dbDiProducts},
#{downstreamEnable}, #{downstreamEnable},
#{syncTime}, #{syncTime},
#{syncDownloadTime},
#{orderUnReceive}, #{orderUnReceive},
#{orderUnCheck}, #{orderUnCheck},
#{busTypes}, #{busTypes},
#{syncIp},
#{sysUser}, #{sysUser},
#{entrustAction},
#{orderSyncTime}, #{orderSyncTime},
#{orderSyncDlTime} #{orderSyncStart},
#{basicSyncStart},
#{entrustAction},
#{unCheckCert},
#{checkedCert}
) )
</insert> </insert>
</mapper> </mapper>

@ -52,7 +52,7 @@
INTO pur_apply INTO pur_apply
( (
billNo,billDate,status,billType,remark,locStorageCode,invWarehouseCode, billNo,billDate,status,billType,remark,locStorageCode,invWarehouseCode,
deptCode,createBy,createTime,auditBy,auditTime,updateTime,auditRemark deptCode,createBy,createTime,auditBy,auditTime,updateTime,auditRemark,targetInv,targetSubInv,targetBillType
) )
values ( values (
#{billNo}, #{billNo},
@ -68,7 +68,9 @@
#{auditBy}, #{auditBy},
#{auditTime}, #{auditTime},
#{updateTime}, #{updateTime},
#{auditRemark} #{auditRemark},
#{targetInv},
#{targetSubInv},#{targetBillType}
) )
</insert> </insert>
@ -104,6 +106,9 @@
<if test="createTime != null">createTime=#{createTime},</if> <if test="createTime != null">createTime=#{createTime},</if>
<if test="updateTime != null">updateTime=#{updateTime},</if> <if test="updateTime != null">updateTime=#{updateTime},</if>
<if test="auditRemark != null">auditRemark=#{auditRemark},</if> <if test="auditRemark != null">auditRemark=#{auditRemark},</if>
<if test="targetInv != null">targetInv=#{targetInv},</if>
<if test="targetSubInv != null">targetSubInv=#{targetSubInv},</if>
<if test="targetBillType != null">targetBillType=#{targetBillType},</if>
</trim> </trim>
WHERE id = #{id} WHERE id = #{id}

@ -44,6 +44,9 @@
<if test="unitIdFk != null and unitIdFk != ''"> <if test="unitIdFk != null and unitIdFk != ''">
and unitIdFk = #{unitIdFk} and unitIdFk = #{unitIdFk}
</if> </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> </where>
</select> </select>
<delete id="deleteCompany" parameterType="java.lang.Long"> <delete id="deleteCompany" parameterType="java.lang.Long">
@ -150,10 +153,10 @@
</update> </update>
<insert id="insertCompany" parameterType="com.glxp.api.admin.entity.purchase.SupCompanyEntity"> <insert id="insertCompany" parameterType="com.glxp.api.admin.entity.purchase.SupCompanyEntity">
INSERT INTO sup_company(companyName, bussinessStatus, creditNum, classes, area, INSERT INTO company(companyName, bussinessStatus, creditNum, classes, area,
detailAddr, appId, appSecret, contacts, mobile, tel, email, customerId, areaCode, detailAddr, appId, appSecret, contacts, mobile, tel, email, customerId, areaCode,
auditStatus, unitIdFk, createTime, createBy, updateTime, auditTime, auditComment, auditStatus, unitIdFk, createTime, createBy, updateTime, auditTime, auditComment,
editStatus) editStatus)
values (#{companyName}, values (#{companyName},
#{bussinessStatus}, #{bussinessStatus},
#{creditNum}, #{creditNum},

@ -29,7 +29,7 @@
and manufacturerId = #{manufacturerId} and manufacturerId = #{manufacturerId}
</if> </if>
<if test="companyName != null and companyName != ''"> <if test="companyName != null and companyName != ''">
and companyName like concat('%',#{companyName},'%') and sup_manufacturer.companyName like concat('%',#{companyName},'%')
</if> </if>
<if test="creditCode != null and creditCode != ''"> <if test="creditCode != null and creditCode != ''">
and creditCode like concat('%',#{creditCode},'%') and creditCode like concat('%',#{creditCode},'%')
@ -56,7 +56,9 @@
<if test="auditStatus ==22"> <if test="auditStatus ==22">
and (sup_manufacturer.auditStatus = 1 or sup_manufacturer.auditStatus=4 ) and (sup_manufacturer.auditStatus = 1 or sup_manufacturer.auditStatus=4 )
</if> </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> </where>
</select> </select>
@ -83,8 +85,8 @@
<if test="productionRecordSection != null">productionRecordSection=#{productionRecordSection},</if> <if test="productionRecordSection != null">productionRecordSection=#{productionRecordSection},</if>
<if test="productionRecordDate != null">productionRecordDate=#{productionRecordDate},</if> <if test="productionRecordDate != null">productionRecordDate=#{productionRecordDate},</if>
<if test="remark != null">remark=#{remark},</if> <if test="remark != null">remark=#{remark},</if>
<if test="createDate != null">create_date=#{createDate},</if> <if test="createTime != null">createTime=#{createTime},</if>
<if test="updateDate != null">update_date=#{updateDate},</if> <if test="updateTime != null">updateTime=#{updateTime},</if>
<if test="customerId != null">customerId=#{customerId},</if> <if test="customerId != null">customerId=#{customerId},</if>
<if test="manufacturerId != null">manufacturerId=#{manufacturerId},</if> <if test="manufacturerId != null">manufacturerId=#{manufacturerId},</if>
<if test="auditStatus != null">auditStatus=#{auditStatus},</if> <if test="auditStatus != null">auditStatus=#{auditStatus},</if>
@ -98,20 +100,20 @@
<insert id="insertCompany" parameterType="com.glxp.api.admin.entity.purchase.SupManufacturerEntity"> <insert id="insertCompany" parameterType="com.glxp.api.admin.entity.purchase.SupManufacturerEntity">
INSERT INTO sup_manufacturer(companyName, creditCode, companyType, INSERT INTO sup_manufacturer(companyName, creditCode, companyType,
placeArea, placeAreaCode, placeAddress, placeArea, placeAreaCode, placeAddress,
legalPersonName, legalPersonPapersType, legalPersonPapersCode, legalPersonName, legalPersonPapersType, legalPersonPapersCode,
productionArea, productionAreaCode, productionAddress, productionArea, productionAreaCode, productionAddress,
registerStatus, productionLicenceNum, productionLicenceDate, registerStatus, productionLicenceNum, productionLicenceDate,
productionRecordNum, productionRecordSection, productionRecordDate, productionRecordNum, productionRecordSection, productionRecordDate,
remark, create_date, update_date, customerId, manufacturerId, remark, createTime, updateTime, customerId, manufacturerId,
auditStatus, auditComment) auditStatus, auditComment)
values (#{companyName}, #{creditCode}, #{companyType}, values (#{companyName}, #{creditCode}, #{companyType},
#{placeArea}, #{placeAreaCode}, #{placeAddress}, #{placeArea}, #{placeAreaCode}, #{placeAddress},
#{legalPersonName}, #{legalPersonPapersType}, #{legalPersonPapersCode}, #{legalPersonName}, #{legalPersonPapersType}, #{legalPersonPapersCode},
#{productionArea}, #{productionAreaCode}, #{productionAddress}, #{productionArea}, #{productionAreaCode}, #{productionAddress},
#{registerStatus}, #{productionLicenceNum}, #{productionLicenceDate}, #{registerStatus}, #{productionLicenceNum}, #{productionLicenceDate},
#{productionRecordNum}, #{productionRecordSection}, #{productionRecordDate}, #{productionRecordNum}, #{productionRecordSection}, #{productionRecordDate},
#{remark}, #{createDate}, #{updateDate}, #{customerId}, #{manufacturerId}, #{auditStatus}, #{remark}, #{createTime}, #{updateDate}, #{customerId}, #{manufacturerId}, #{auditStatus},
#{auditComment}) #{auditComment})
</insert> </insert>

@ -17,6 +17,54 @@
where recordProductName = #{recordProductName} where recordProductName = #{recordProductName}
</select> </select>
<select id="filterProducts" parameterType="com.glxp.sale.admin.req.purchase.FilterPoductRequest"
resultType="com.glxp.sale.admin.entity.purchase.SupProductEntity">
SELECT sup_product.* FROM sup_product
<where>
<if test="id != null and id != ''">
and sup_product.id = #{id}
</if>
<if test="productId != null and productId != ''">
and sup_product.productId = #{productId}
</if>
<if test="enterpriseId != null and enterpriseId != ''">
and sup_product.enterpriseId = #{enterpriseId}
</if>
<if test="recordCode != null and recordCode != ''">
and sup_product.recordCode like concat('%',#{recordCode},'%')
</if>
<if test="recordProductName != null and recordProductName != ''">
and sup_product.recordProductName like concat('%',#{recordProductName},'%')
</if>
<if test="recordPeopleName != null and recordPeopleName != ''">
and sup_product.recordPeopleName like concat('%',#{recordPeopleName},'%')
</if>
<if test="manufacturerIdFk != null and manufacturerIdFk != ''">
and sup_product.manufacturerIdFk = #{manufacturerIdFk}
</if>
<if test="customerId != null and customerId != ''">
and sup_product.customerId = #{customerId}
</if>
<if test="auditStatus != null and auditStatus !=20 and auditStatus !=22 and auditStatus !=21">
and sup_product.auditStatus = #{auditStatus}
</if>
<if test="auditStatus ==20">
and (sup_product.auditStatus = 0 or sup_product.auditStatus=5 or
sup_product.auditStatus=2)
</if>
<if test="auditStatus ==21">
and <![CDATA[ sup_product.auditStatus <> 0 ]]>
</if>
<if test="auditStatus ==22">
and (sup_product.auditStatus = 1 or sup_product.auditStatus=4 )
</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>
</select>
<select id="getRegistration" parameterType="com.glxp.api.admin.req.purchase.FilterPoductRequest" <select id="getRegistration" parameterType="com.glxp.api.admin.req.purchase.FilterPoductRequest"
resultType="com.glxp.api.admin.res.purchase.SupProductResponse"> resultType="com.glxp.api.admin.res.purchase.SupProductResponse">
SELECT sup_product.* ,sup_company.companyName SELECT sup_product.* ,sup_company.companyName
@ -56,7 +104,6 @@
<if test="auditStatus != null and auditStatus !=20 and auditStatus !=22 and auditStatus !=21"> <if test="auditStatus != null and auditStatus !=20 and auditStatus !=22 and auditStatus !=21">
and sup_product.auditStatus = #{auditStatus} and sup_product.auditStatus = #{auditStatus}
</if> </if>
<if test="auditStatus ==20"> <if test="auditStatus ==20">
and (sup_product.auditStatus = 0 or sup_product.auditStatus=5 or and (sup_product.auditStatus = 0 or sup_product.auditStatus=5 or
sup_product.auditStatus=2) sup_product.auditStatus=2)
@ -102,8 +149,8 @@
<if test="other != null">other=#{other},</if> <if test="other != null">other=#{other},</if>
<if test="filePath != null">filePath=#{filePath},</if> <if test="filePath != null">filePath=#{filePath},</if>
<if test="remark != null">remark=#{remark},</if> <if test="remark != null">remark=#{remark},</if>
<if test="create_date != null">create_date=#{create_date},</if> <if test="createTime != null">createTime=#{createTime},</if>
<if test="update_date != null">update_date=#{update_date},</if> <if test="updateTime != null">updateTime=#{updateTime},</if>
<if test="manufacturerIdFk != null">manufacturerIdFk=#{manufacturerIdFk},</if> <if test="manufacturerIdFk != null">manufacturerIdFk=#{manufacturerIdFk},</if>
<if test="customerId != null">customerId=#{customerId},</if> <if test="customerId != null">customerId=#{customerId},</if>
<if test="productId != null">productId=#{productId},</if> <if test="productId != null">productId=#{productId},</if>
@ -124,16 +171,16 @@
<insert id="insertRegistration" parameterType="com.glxp.api.admin.entity.purchase.SupProductEntity"> <insert id="insertRegistration" parameterType="com.glxp.api.admin.entity.purchase.SupProductEntity">
INSERT INTO sup_product(enterpriseId, recordCode, recordProductName, INSERT INTO sup_product(enterpriseId, recordCode, recordProductName,
productManageType, recordPeopleName, recordPeopleArea, productManageType, recordPeopleName, recordPeopleArea,
recordPeopleAreaCode, recordPeopleAddress, productType, recordPeopleAreaCode, recordPeopleAddress, productType,
productDirectoryCode, agentName, agentArea, productDirectoryCode, agentName, agentArea,
agentAreaCode, agentAddress, instructions, agentAreaCode, agentAddress, instructions,
productAddress, recordText, placeOrigin, productAddress, recordText, placeOrigin,
productionRegion, productionCompanyName, afterSale, productionRegion, productionCompanyName, afterSale,
specification, structure, `scope`, specification, structure, `scope`,
other, filePath, remark, other, filePath, remark,
create_date, update_date, manufacturerIdFk, customerId, productId createTime, updateTime, manufacturerIdFk, customerId, productId
, auditStatus, auditComment, sptm, ybbm, measname, cpms,hchzsb,relIdFk) , auditStatus, auditComment, sptm, ybbm, measname, cpms, hchzsb)
values (#{enterpriseId}, #{recordCode}, #{recordProductName}, values (#{enterpriseId}, #{recordCode}, #{recordProductName},
#{productManageType}, #{recordPeopleName}, #{recordPeopleArea}, #{productManageType}, #{recordPeopleName}, #{recordPeopleArea},
#{recordPeopleAreaCode}, #{recordPeopleAddress}, #{productType}, #{recordPeopleAreaCode}, #{recordPeopleAddress}, #{productType},
@ -143,8 +190,8 @@
#{productionRegion}, #{productionCompanyName}, #{afterSale}, #{productionRegion}, #{productionCompanyName}, #{afterSale},
#{specification}, #{structure}, #{scope}, #{specification}, #{structure}, #{scope},
#{other}, #{filePath}, #{remark}, #{other}, #{filePath}, #{remark},
#{create_date}, #{update_date}, #{manufacturerIdFk}, #{customerId}, #{productId} #{createTime}, #{updateTime}, #{manufacturerIdFk}, #{customerId}, #{productId}
, #{auditStatus}, #{auditComment}, #{sptm}, #{ybbm}, #{measname}, #{cpms},#{hchzsb},#{relIdFk}) , #{auditStatus}, #{auditComment}, #{sptm}, #{ybbm}, #{measname}, #{cpms}, #{hchzsb})
</insert> </insert>
<delete id="deleteById" parameterType="Map"> <delete id="deleteById" parameterType="Map">

Loading…
Cancel
Save