资质审核新增下级状态

master
郑明梁 2 years ago
parent 578936a7aa
commit bca51c7573

@ -306,4 +306,13 @@ public class SupCompanyEntity {
private String roleId; private String roleId;
@TableField(exist = false)
private String failCout;
@TableField(exist = false)
private String passCout;
} }

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

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

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

@ -14,7 +14,13 @@
<select id="filterCompany" parameterType="com.glxp.api.req.purchase.FilterSupCompanyRequest" <select id="filterCompany" parameterType="com.glxp.api.req.purchase.FilterSupCompanyRequest"
resultType="com.glxp.api.entity.purchase.SupCompanyEntity"> 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
</if>
FROM sup_company
<where> <where>
<if test="customerId != null and customerId != ''"> <if test="customerId != null and customerId != ''">
and parentIdFk = #{customerId} and parentIdFk = #{customerId}

@ -19,7 +19,12 @@
<select id="getCompany" parameterType="com.glxp.api.req.purchase.FilterSupManufacturerRequest" <select id="getCompany" parameterType="com.glxp.api.req.purchase.FilterSupManufacturerRequest"
resultType="com.glxp.api.entity.purchase.SupManufacturerEntity"> 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 inner join sup_company on sup_manufacturer.customerId = sup_company.customerId
<where> <where>
<if test="id != null and id != '' and type==null"> <if test="id != null and id != '' and type==null">

Loading…
Cancel
Save