Merge remote-tracking branch 'origin/busUser' into busUser

feature-order-fix
x_z 2 years ago
commit bf6ca801db

@ -501,17 +501,20 @@ public class StockOrderDetailController {
companyProductRelevanceRequest.setUnitFk(companyProductRelevanceRequest.getCorpId());
basicInstrumentMaintainRelevanceResponses = companyProductRelevanceService.filterUdiGp(companyProductRelevanceRequest);
} else {
List<UdiRelevanceResponse> udiRelevanceResponses = udiRelevanceService.filterUdiGp(filterUdiInfoRequest);
pageInfo2 = new PageInfo<>(udiRelevanceResponses);
if (!pageInfo2.getList().isEmpty()) {
basicInstrumentMaintainRelevanceResponses = new ArrayList<>(pageInfo2.getList().size());
for (UdiRelevanceResponse udiRelevanceResponse : pageInfo2.getList()) {
CompanyProductRelevanceResponse companyProductRelevanceResponse = new CompanyProductRelevanceResponse();
BeanUtils.copyProperties(udiRelevanceResponse, companyProductRelevanceResponse);
companyProductRelevanceResponse.setRlId(udiRelevanceResponse.getId());
basicInstrumentMaintainRelevanceResponses.add(companyProductRelevanceResponse);
}
}
// List<UdiRelevanceResponse> udiRelevanceResponses = udiRelevanceService.filterUdiGp(filterUdiInfoRequest);
// pageInfo2 = new PageInfo<>(udiRelevanceResponses);
// if (!pageInfo2.getList().isEmpty()) {
// basicInstrumentMaintainRelevanceResponses = new ArrayList<>(pageInfo2.getList().size());
// for (UdiRelevanceResponse udiRelevanceResponse : pageInfo2.getList()) {
// CompanyProductRelevanceResponse companyProductRelevanceResponse = new CompanyProductRelevanceResponse();
// BeanUtils.copyProperties(udiRelevanceResponse, companyProductRelevanceResponse);
// companyProductRelevanceResponse.setRlId(udiRelevanceResponse.getId());
// basicInstrumentMaintainRelevanceResponses.add(companyProductRelevanceResponse);
// }
// }
companyProductRelevanceRequest.setCustomerId(null);
basicInstrumentMaintainRelevanceResponses = companyProductRelevanceService.filterUdiGp(companyProductRelevanceRequest);
}
PageInfo<CompanyProductRelevanceResponse> pageInfo;
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.req.basic.CompanyProductRelevanceRequest;
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.info.CompanyRequest;
import com.glxp.api.admin.req.info.DeleteCompanyFileRequest;
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.service.auth.AuthAdminService;
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.CompanyService;
import com.glxp.api.admin.thread.CompanyProductsRelService;
@ -50,6 +53,9 @@ public class CompanyProductRelevanceController {
@Resource
private BasicUnitMaintainService basicUnitMaintainService;
@Resource
private UdiRelevanceService udiRelevanceService;
@AuthRuleAnnotation("")
@GetMapping("/sale/info/company/product/relevance/filter")
public BaseResponse filterCompanyProductRelevance(CompanyProductRelevanceRequest companyProductRelevanceRequest,
@ -58,6 +64,17 @@ public class CompanyProductRelevanceController {
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;
companyProductRelevanceRequest.setDiType(1);
basicInstrumentMaintainRelevanceResponses = companyProductRelevanceService.filterUdiGp(companyProductRelevanceRequest);
@ -153,8 +170,8 @@ public class CompanyProductRelevanceController {
@AuthRuleAnnotation("")
@PostMapping("/sale/info/insertFilter")
public BaseResponse insertFilter(@RequestBody UdiInfoExportRequest udiInfoExportRequest) {
if(StrUtil.isEmpty(udiInfoExportRequest.getUnitFk())){
return ResultVOUtils.error(500,"未选择供应商!");
if (StrUtil.isEmpty(udiInfoExportRequest.getUnitFk())) {
return ResultVOUtils.error(500, "未选择供应商!");
}
companyProductsRelService.insertCompanyProducts(udiInfoExportRequest);
return ResultVOUtils.success("后台正在导入,请稍后刷新查看!");

@ -1,6 +1,7 @@
package com.glxp.api.admin.controller.purchase;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.util.StrUtil;
import com.github.pagehelper.PageInfo;
import com.glxp.api.admin.annotation.AuthRuleAnnotation;
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.util.ResultVOUtils;
import lombok.RequiredArgsConstructor;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.BeanUtils;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
@ -91,6 +93,7 @@ public class PurApplyController {
for (StockOrderDetailEntity stockOrderDetailEntity : postPurApplyRequest.getSubErpOrders()) {
PurApplyDetailEntity purApplyDetailEntity = new PurApplyDetailEntity();
BeanUtils.copyProperties(stockOrderDetailEntity, purApplyDetailEntity);
purApplyDetailEntity.setCount(stockOrderDetailEntity.getCount());
purApplyDetailEntity.setOrderIdFk(purApplyEntity.getId() + "");
purApplyDetailService.insert(purApplyDetailEntity);
}
@ -159,15 +162,15 @@ public class PurApplyController {
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();
String billNo = gennerOrderUtils.createStOrderNo(new OrderNoTypeBean(Constant.JH_ORDER, "yyyyMMdd"));
purPlanEntity.setBillNo(billNo);
purPlanEntity.setBillDate(new Date());
purPlanEntity.setStatus(ConstantStatus.APPLY_UN_AUDIT);
purPlanEntity.setLocStorageCode(purApplyEntity.getLocStorageCode());
purPlanEntity.setInvWarehouseCode(purApplyEntity.getInvWarehouseCode());
purPlanEntity.setLocStorageCode(purApplyEntity.getTargetInv());
purPlanEntity.setInvWarehouseCode(purApplyEntity.getTargetSubInv());
purPlanEntity.setBillType(purApplyEntity.getTargetBillType());
purPlanEntity.setDeptCode(purApplyEntity.getDeptCode());
purPlanEntity.setCreateBy(purApplyEntity.getAuditBy());
purPlanEntity.setCreateTime(new Date());

@ -172,9 +172,9 @@ public class PurPlanController {
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)) {
//1.根据供应商分组
@ -204,8 +204,6 @@ public class PurPlanController {
stockOrderEntity.setCorpName(basicUnitMaintainEntity.getName());
stockOrderEntity.setBilldate(DateUtil.formatDateTime(new Date()));
stockOrderEntity.setStatus(ConstantStatus.SORDER_ALLOC);
//todo
BasicBusTypeChangeEntity basicBusTypeChangeEntity = basicBusTypeChangeService.findByAction("purplan");
stockOrderEntity.setBillType(basicBusTypeChangeEntity.getTargetBusAction());
stockOrderEntity.setInvWarehouseCode(purApplyEntity.getInvWarehouseCode());
stockOrderEntity.setLocStorageCode(purApplyEntity.getLocStorageCode());

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

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

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

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

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

@ -32,4 +32,7 @@ public class SyncDataSetEntity {
private Integer orderSyncTime;
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 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 Date productionRecordDate;
private String remark;
private Date createDate;
private Date updateDate;
private Date createTime;
private Date updateTime;
private String customerId;
private String manufacturerId;

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

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

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

@ -45,7 +45,7 @@ public class PurApplyRequest extends ListPageRequest {
*
*/
@NotNull(message = "申购类型不能为空")
private Integer billType;
private String billType;
/**
*
@ -93,6 +93,8 @@ public class PurApplyRequest extends ListPageRequest {
*/
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 String uuid;
private Integer diType;
}

@ -18,6 +18,6 @@ public class BasicUnitMaintainResponse {
private String mobile;
private String thirdName;
private String unitId;
private int corpType;
private int outType;
private Integer corpType;
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.InvSubWarehouseEntity;
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 lombok.Data;
@ -46,4 +50,10 @@ public class SpsSyncDataResponse {
//新增配送产品信息
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 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<SupProductEntity> filterProducts(FilterPoductRequest filterPoductRequest);
boolean modifyRegistration(SupProductEntity supProductEntity);
boolean insertRegistration(SupProductEntity supProductEntity);

@ -85,6 +85,19 @@ public class SupProductServiceImpl implements SupProductService {
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
public boolean modifyRegistration(SupProductEntity companyEntity) {
return supProductDao.modifyRegistration(companyEntity);

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

@ -52,7 +52,7 @@
INTO pur_apply
(
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 (
#{billNo},
@ -68,7 +68,9 @@
#{auditBy},
#{auditTime},
#{updateTime},
#{auditRemark}
#{auditRemark},
#{targetInv},
#{targetSubInv},#{targetBillType}
)
</insert>
@ -104,6 +106,9 @@
<if test="createTime != null">createTime=#{createTime},</if>
<if test="updateTime != null">updateTime=#{updateTime},</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>
WHERE id = #{id}

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

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

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

Loading…
Cancel
Save