资质证书页面修改

master
郑明梁 2 years ago
parent bb8626eff5
commit ebf625ec09

@ -460,4 +460,35 @@ public class SupCertController {
JasperUtils.jasperReport(request, response, param, systemPDFTemplateEntity.getPath(), "pdf");
}
//撤回单据
@AuthRuleAnnotation("")
@PostMapping("/sale/sup/cert/revoke")
public BaseResponse revokeSupCert(@RequestBody SupCertEntity supCertEntity) {
supCertEntity.setCreateTime(new Date());
supCertEntity.setUpdateTime(new Date());
boolean b = supCertService.updateCompanyCert(supCertEntity);
if (supCertEntity.getType() == ConstantStatus.CERT_COMPANY) {
SupCompanyEntity supCompanyEntity = supCompanyService.findCompany(supCertEntity.getCustomerId());
supCompanyEntity.setAuditStatus(ConstantStatus.AUDIT_UN);
supCompanyEntity.setUpdateTime(new Date());
supCompanyService.modifyCompany(supCompanyEntity);
} else if (supCertEntity.getType() == ConstantStatus.CERT_MANUFACTURER) {
SupManufacturerEntity supManufacturerEntity = supManufacturerService.findManufacturer(supCertEntity.getManufacturerIdFk());
supManufacturerEntity.setAuditStatus(ConstantStatus.AUDIT_UN);
supManufacturerEntity.setUpdateTime(new Date());
supManufacturerService.modifyCompany(supManufacturerEntity);
} else if (supCertEntity.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_UN);
supProductService.modifyRegistration(supProductEntity);
}
return ResultVOUtils.success("成功");
}
}

@ -302,5 +302,14 @@ public class SupCompanyEntity {
@TableField(exist = false)
private String auditor;
@TableField(exist = false)
private String failCout;
@TableField(exist = false)
private String passCout;
@TableField(exist = false)
private String productFailCout;
@TableField(exist = false)
private String prouctPassCout;
}

@ -195,5 +195,9 @@ public class SupManufacturerEntity{
@TableField(exist = false)
private String supName;
@TableField(exist = false)
private String failCout;
@TableField(exist = false)
private String passCout;
}

@ -254,4 +254,37 @@ public class SupProductEntity{
@TableField("updateTime")
private Date updateTime;
@TableField(value = "manufactory")
private String manufactory;
/**
* ID
*/
@TableField(exist = false)
private String companyName;
/**
*
*/
@TableField(value = "allowNoBatch")
private Boolean allowNoBatch;
/**
*
*/
@TableField(value = "allowNoExpire")
private Boolean allowNoExpire;
/**
*
*/
@TableField(value = "allowNoProduct")
private Boolean allowNoProduct;
/**
*
*/
@TableField(value = "allowNoSerial")
private Boolean allowNoSerial;
}

@ -12,7 +12,7 @@ public class FilterPoductRequest extends ListPageRequest {
private String recordCode;
private String recordProductName;
private String recordPeopleName;
private String manufactory;
private String productId;
private String manufacturerIdFk;

@ -16,4 +16,5 @@ public class FilterSupCompanyRequest extends ListPageRequest {
private String unitIdFk;
private String lastUpdateTime;
private List<String> auditStatusList;
private Integer manufacturerStatus;
}

@ -16,4 +16,5 @@ public class FilterSupManufacturerRequest extends ListPageRequest {
private String manufacturerId;
private Integer type;
private String lastUpdateTime;
private Integer productStatus;
}

@ -14,7 +14,15 @@
<select id="filterCompany" parameterType="com.glxp.api.req.purchase.FilterSupCompanyRequest"
resultType="com.glxp.api.entity.purchase.SupCompanyEntity">
SELECT * FROM sup_company
SELECT
*
<if test="manufacturerStatus!=null">
,(SELECT count(*) FROM sup_manufacturer WHERE sup_company.customerId=sup_manufacturer.customerId AND sup_manufacturer.auditStatus!=1 AND sup_manufacturer.auditStatus!=0 AND sup_manufacturer.auditStatus!=4 ) as failCout,
(SELECT count(*) FROM sup_manufacturer WHERE sup_company.customerId=sup_manufacturer.customerId AND (sup_manufacturer.auditStatus=1 OR sup_manufacturer.auditStatus=4) ) as passCout
,(SELECT count(*) FROM sup_product WHERE sup_company.customerId=sup_product.customerId AND sup_product.auditStatus!=0 AND sup_product.auditStatus!=1 AND sup_product.auditStatus!=4 ) as productFailCout,
(SELECT count(*) FROM sup_product WHERE sup_company.customerId=sup_product.customerId AND (sup_product.auditStatus=1 OR sup_product.auditStatus=4) ) as prouctPassCout
</if>
FROM sup_company
<where>
<if test="customerId != null and customerId != ''">
and parentIdFk = #{customerId}

@ -19,7 +19,12 @@
<select id="getCompany" parameterType="com.glxp.api.req.purchase.FilterSupManufacturerRequest"
resultType="com.glxp.api.entity.purchase.SupManufacturerEntity">
SELECT sup_manufacturer.* ,sup_company.companyName as supName FROM sup_manufacturer
SELECT sup_manufacturer.* ,sup_company.companyName as supName
<if test="productStatus!=null">
,(SELECT count(*) FROM sup_product WHERE sup_manufacturer.customerId=sup_product.customerId AND sup_product.auditStatus!=0 AND sup_product.auditStatus!=1 AND sup_product.auditStatus!=4 AND sup_manufacturer.manufacturerId=sup_product.manufacturerIdFk ) as failCout,
(SELECT count(*) FROM sup_product WHERE sup_manufacturer.customerId=sup_product.customerId AND (sup_product.auditStatus=1 OR sup_product.auditStatus=4) AND sup_manufacturer.manufacturerId=sup_product.manufacturerIdFk ) as passCout
</if>
FROM sup_manufacturer
inner join sup_company on sup_manufacturer.customerId = sup_company.customerId
<where>
<if test="id != null and id != '' and type==null">

@ -48,6 +48,9 @@
<if test="auditStatus != null and auditStatus !=20 and auditStatus !=22 and auditStatus !=21">
and sup_product.auditStatus = #{auditStatus}
</if>
<if test="manufactory != null and manufactory != ''">
and sup_product.manufactory = #{manufactory}
</if>
<if test="auditStatus ==20">
and (sup_product.auditStatus = 0 or sup_product.auditStatus=5 or
sup_product.auditStatus=2)
@ -111,7 +114,9 @@
<if test="auditStatus ==21">
and <![CDATA[ sup_product.auditStatus <> 0 ]]>
</if>
<if test="manufactory != null and manufactory != ''">
and sup_product.manufactory = #{manufactory}
</if>
<if test="auditStatus ==22">
and (sup_product.auditStatus = 1 or sup_product.auditStatus=4 )
</if>
@ -162,7 +167,11 @@
<if test="cpms != null">cpms=#{cpms},</if>
<if test="hchzsb != null">hchzsb=#{hchzsb},</if>
<if test="relIdFk != null">relIdFk=#{relIdFk},</if>
<if test="manufactory != null">manufactory=#{manufactory},</if>
<if test="allowNoBatch != null">allowNoBatch=#{allowNoBatch},</if>
<if test="allowNoExpire != null">allowNoExpire=#{allowNoExpire},</if>
<if test="allowNoProduct != null">allowNoProduct=#{allowNoProduct},</if>
<if test="allowNoSerial != null">allowNoSerial=#{allowNoSerial},</if>
</set>
WHERE id=#{id}
@ -181,7 +190,8 @@
specification, structure, `scope`,
other, filePath, remark,
createTime, updateTime, manufacturerIdFk, customerId, productId
, auditStatus, auditComment, sptm, ybbm, measname, cpms, hchzsb,relIdFk)
, auditStatus, auditComment, sptm, ybbm, measname, cpms, hchzsb,relIdFk,manufactory, allowNoBatch,
allowNoExpire, allowNoProduct, allowNoSerial)
values (
#{enterpriseId},
#{recordCode},
@ -222,7 +232,9 @@
#{measname},
#{cpms},
#{hchzsb},
#{relIdFk}
#{relIdFk},
#{manufactory}, #{allowNoBatch}, #{allowNoExpire}, #{allowNoProduct},
#{allowNoSerial}
)
</insert>

Loading…
Cancel
Save