Browse Source

xml

dev_kxc
zhuyulei 1 year ago
parent
commit
7690df3fb2
  1. 5
      jwtech-system/src/main/java/com/kms/enterprise/controller/BsSgcYxjdDynamicCreditController.java
  2. 8
      jwtech-system/src/main/java/com/kms/enterprise/controller/BsSgcYxjdQualificationsController.java
  3. 1
      jwtech-system/src/main/java/com/kms/enterprise/domain/BsSgcYxjdQualifications.java
  4. 4
      jwtech-system/src/main/java/com/kms/enterprise/domain/dto/DisclosureDto.java
  5. 3
      jwtech-system/src/main/java/com/kms/enterprise/mapper/BsSgcYxjdDynamicCreditMapper.java
  6. 2
      jwtech-system/src/main/java/com/kms/enterprise/mapper/BsSgcYxjdQualificationsMapper.java
  7. 5
      jwtech-system/src/main/java/com/kms/enterprise/service/BsSgcYxjdDynamicCreditService.java
  8. 6
      jwtech-system/src/main/java/com/kms/enterprise/service/BsSgcYxjdQualificationsService.java
  9. 27
      jwtech-system/src/main/resources/mapper/enterprise/BsSgcYxjdDynamicCreditMapper.xml
  10. 57
      jwtech-system/src/main/resources/mapper/enterprise/BsSgcYxjdQualificationsMapper.xml

5
jwtech-system/src/main/java/com/kms/enterprise/controller/BsSgcYxjdDynamicCreditController.java

@ -121,6 +121,11 @@ public class BsSgcYxjdDynamicCreditController extends BaseController {
} }
@PostMapping("/getBadAll")
public AjaxResult getBadAll(@RequestBody DisclosureDto dto) {
return bsSgcYxjdDynamicCreditService.getBadAll(dto);
}
/** /**
* 查询动态信用列表 * 查询动态信用列表

8
jwtech-system/src/main/java/com/kms/enterprise/controller/BsSgcYxjdQualificationsController.java

@ -73,13 +73,13 @@ public class BsSgcYxjdQualificationsController extends BaseController
/** /**
* 获取父企业资质 * 获取父企业资质
* @param eid * @param enterpriseId
* @return * @return
*/ */
@GetMapping("/getParent/{eid}") @GetMapping("/getParent/{enterpriseId}")
public AjaxResult getParent(@PathVariable("eid") String eid) { public AjaxResult getParent(@PathVariable("enterpriseId") String enterpriseId) {
List<BsSgcYxjdQualifications> parent = bsSgcYxjdQualificationsService.getParent(eid); List<BsSgcYxjdQualifications> parent = bsSgcYxjdQualificationsService.getParent(enterpriseId);
return AjaxResult.success(parent); return AjaxResult.success(parent);

1
jwtech-system/src/main/java/com/kms/enterprise/domain/BsSgcYxjdQualifications.java

@ -35,6 +35,7 @@ public class BsSgcYxjdQualifications extends BaseEntity
@ApiModelProperty("企业id") @ApiModelProperty("企业id")
private String enterpriseId; private String enterpriseId;
/** 父id */ /** 父id */
@Excel(name = "父id") @Excel(name = "父id")
@ApiModelProperty("父id") @ApiModelProperty("父id")

4
jwtech-system/src/main/java/com/kms/enterprise/domain/dto/DisclosureDto.java

@ -19,4 +19,8 @@ public class DisclosureDto implements Serializable {
private String adcd; private String adcd;
private String enterpriseId;
private String type;
} }

3
jwtech-system/src/main/java/com/kms/enterprise/mapper/BsSgcYxjdDynamicCreditMapper.java

@ -25,6 +25,9 @@ public interface BsSgcYxjdDynamicCreditMapper extends BaseMapper<BsSgcYxjdDynami
@Param("qualificationCategory") String qualificationCategory, @Param("qualificationCategory") String qualificationCategory,
@Param("pageNum") int pageNum,@Param("pageSize") int pageSize); @Param("pageNum") int pageNum,@Param("pageSize") int pageSize);
List<BadHaviorDto> getBadAll(@Param("enterpriseId")String enterpriseId,
@Param("type") String type);
List<BadHaviorDto> getGood(@Param("adcd")String adcd, List<BadHaviorDto> getGood(@Param("adcd")String adcd,
@Param("enterpriseName") String enterpriseName, @Param("enterpriseName") String enterpriseName,
@Param("qualificationCategory")String qualificationCategory, @Param("qualificationCategory")String qualificationCategory,

2
jwtech-system/src/main/java/com/kms/enterprise/mapper/BsSgcYxjdQualificationsMapper.java

@ -24,6 +24,8 @@ public interface BsSgcYxjdQualificationsMapper extends BaseMapper<BsSgcYxjdQuali
List<CreditDto> listByOne(); List<CreditDto> listByOne();
List<BsSgcYxjdQualifications> selectList1(String eid);
List<CreditDto> listTwo(@Param("pageNum") int pageNum, List<CreditDto> listTwo(@Param("pageNum") int pageNum,
@Param("pageSize") int pageSize, @Param("pageSize") int pageSize,
@Param("qualificationCategory") String qualificationCategory, @Param("qualificationCategory") String qualificationCategory,

5
jwtech-system/src/main/java/com/kms/enterprise/service/BsSgcYxjdDynamicCreditService.java

@ -62,4 +62,9 @@ public class BsSgcYxjdDynamicCreditService extends BaseService<BsSgcYxjdDynamicC
return page; return page;
} }
public AjaxResult getBadAll(DisclosureDto dto) {
List<BadHaviorDto> bad = bsSgcYxjdDynamicCreditMapper.getBadAll(dto.getEnterpriseId(), dto.getType());
return AjaxResult.success(bad);
}
} }

6
jwtech-system/src/main/java/com/kms/enterprise/service/BsSgcYxjdQualificationsService.java

@ -40,7 +40,7 @@ public class BsSgcYxjdQualificationsService extends BaseService<BsSgcYxjdQualifi
queryWrapper.eq(BsSgcYxjdQualifications::getEnterpriseId, eid); queryWrapper.eq(BsSgcYxjdQualifications::getEnterpriseId, eid);
//查询全部同企业信息 //查询全部同企业信息
List<BsSgcYxjdQualifications> list = qualificationsMapper List<BsSgcYxjdQualifications> list = qualificationsMapper
.selectList(queryWrapper); .selectList1(eid);
//获取parentid为null的集合 //获取parentid为null的集合
List<BsSgcYxjdQualifications> master = list.stream().filter(e -> e.getParentId() == null).collect(Collectors.toList()); List<BsSgcYxjdQualifications> master = list.stream().filter(e -> e.getParentId() == null).collect(Collectors.toList());
@ -61,11 +61,11 @@ public class BsSgcYxjdQualificationsService extends BaseService<BsSgcYxjdQualifi
} }
public List<BsSgcYxjdQualifications> getParent(String eid) { public List<BsSgcYxjdQualifications> getParent(String enterpriseId) {
LambdaQueryWrapper<BsSgcYxjdQualifications> queryWrapper = Wrappers.lambdaQuery(BsSgcYxjdQualifications.class); LambdaQueryWrapper<BsSgcYxjdQualifications> queryWrapper = Wrappers.lambdaQuery(BsSgcYxjdQualifications.class);
queryWrapper.eq(BsSgcYxjdQualifications::getEnterpriseId, eid); queryWrapper.eq(BsSgcYxjdQualifications::getEnterpriseId, enterpriseId);
queryWrapper.isNull(BsSgcYxjdQualifications::getParentId); queryWrapper.isNull(BsSgcYxjdQualifications::getParentId);
List<BsSgcYxjdQualifications> list = qualificationsMapper.selectList(queryWrapper); List<BsSgcYxjdQualifications> list = qualificationsMapper.selectList(queryWrapper);

27
jwtech-system/src/main/resources/mapper/enterprise/BsSgcYxjdDynamicCreditMapper.xml

@ -29,6 +29,20 @@
<result property="projectLocation" column="project_location"/> <result property="projectLocation" column="project_location"/>
</resultMap> </resultMap>
<resultMap id="BsSgcYxjdDynamicCredit" type="BsSgcYxjdDynamicCredit">
<id property="id" column="id"/>
<result property="enterpriseName" column="enterprise_name"/>
<result property="qualificationCategory" column="qualification_category" />
<result property="projectName" column="project_name"/>
<result property="noticeBeginTime" column="notice_begin_time"/>
<result property="publishUnit" column="publish_unit"/>
<result property="badBehavior" column="bad_behavior"/>
<result property="commendationLevel" column="commendation_level"/>
<result property="bonusPoints" column="bonus_points"/>
<result property="validityPeriod" column="validity_period"/>
<result property="attachment" column="attachment"/>
</resultMap>
<select id="getBadLimit" resultMap="BadHaviorDto"> <select id="getBadLimit" resultMap="BadHaviorDto">
SELECT dc.enterprise_id, SELECT dc.enterprise_id,
ei.enterprise_name, ei.enterprise_name,
@ -120,5 +134,18 @@
order by dc.create_time desc limit #{pageNum},#{pageSize}; order by dc.create_time desc limit #{pageNum},#{pageSize};
</select> </select>
<select id="getBadAll" resultMap="BsSgcYxjdDynamicCredit">
select ei.enterprise_name,pr.qualification_category,pr.project_name,dc.*
from bs_sgc_yxjd_dynamic_credit dc
left join bs_sgc_yxjd_engineer_performance_record pr on dc.record_id = pr.id
left join bs_sgc_yxjd_enterprise_info ei on dc.enterprise_id=ei.id
where type = "0"
and dc.enterprise_id = #{enterpriseId};
</select>
</mapper> </mapper>

57
jwtech-system/src/main/resources/mapper/enterprise/BsSgcYxjdQualificationsMapper.xml

@ -20,6 +20,19 @@
<result property="enterpriseId" column="enterprise_id"/> <result property="enterpriseId" column="enterprise_id"/>
</resultMap> </resultMap>
<resultMap id="BsSgcYxjdQualifications" type="BsSgcYxjdQualifications">
<id column="id" property="id"/>
<result property="enterpriseName" column="enterprise_name"/>
<result property="enterpriseId" column="enterprise_id"/>
<result property="qualificationCategory" column="qualification_category"/>
<result property="level" column="level"/>
<result property="professionalCategory" column="professional_category"/>
<result property="certificateNo" column="certificate_no"/>
<result property="issuedBy" column="issued_by"/>
<result property="issuanceDate" column="issuance_date"/>
<result property="validityPeriod" column="validity_period"/>
</resultMap>
<select id="listByZero" resultMap="CreditDto"> <select id="listByZero" resultMap="CreditDto">
SELECT SELECT
enterprise_id, enterprise_id,
@ -39,18 +52,27 @@
<select id="listByOne" resultMap="CreditDto"> <select id="listByOne" resultMap="CreditDto">
SET @num := 0, @type := ''; SET
@num := 0, @type := '';
SELECT enterprise_id,enterprise_name,ADCD,dynamic_credit_score, SELECT enterprise_id,
qualification_category,legal_representative enterprise_name,
FROM bs_sgc_yxjd_enterprise_info fo LEFT JOIN (SELECT qualification_category, dynamic_credit_score,enterprise_id ADCD,
FROM ( dynamic_credit_score,
SELECT qualification_category, dynamic_credit_score,enterprise_id, qualification_category,
@num := IF(@type = qualification_category, @num + 1, 1) AS row_number, legal_representative
FROM bs_sgc_yxjd_enterprise_info fo
LEFT JOIN (SELECT qualification_category, dynamic_credit_score, enterprise_id
FROM (SELECT qualification_category,
dynamic_credit_score,
enterprise_id,
@num := IF(@type = qualification_category, @num + 1, 1) AS row_number,
@type := qualification_category AS dummy @type := qualification_category AS dummy
FROM bs_sgc_yxjd_qualifications WHERE ISNULL( parent_id ) FROM bs_sgc_yxjd_qualifications
ORDER BY qualification_category, CAST( dynamic_credit_score AS UNSIGNED ) ASC WHERE ISNULL( parent_id )
) AS t WHERE t.row_number &lt;= 5) res ON fo.id=res.enterprise_id GROUP BY enterprise_id
ORDER BY qualification_category, CAST ( dynamic_credit_score AS UNSIGNED ) ASC) AS t
WHERE t.row_number &lt;= 5) res ON fo.id = res.enterprise_id
</select> </select>
<select id="listTwo" resultMap="CreditDto"> <select id="listTwo" resultMap="CreditDto">
<bind name="pageNum" value="(pageNum-1)*pageSize"></bind> <bind name="pageNum" value="(pageNum-1)*pageSize"></bind>
@ -75,7 +97,7 @@
AND q.qualification_category = #{qualificationCategory} AND q.qualification_category = #{qualificationCategory}
</if> </if>
</where> </where>
GROUP BY enterprise_id
ORDER BY ORDER BY
CAST( dynamic_credit_score AS UNSIGNED ) DESC LIMIT #{pageNum},#{pageSize}; CAST( dynamic_credit_score AS UNSIGNED ) DESC LIMIT #{pageNum},#{pageSize};
</select> </select>
@ -102,6 +124,7 @@
AND q.qualification_category = #{qualificationCategory} AND q.qualification_category = #{qualificationCategory}
</if> </if>
</where> </where>
GROUP BY enterprise_id
ORDER BY ORDER BY
CAST( dynamic_credit_score AS UNSIGNED ) DESC LIMIT #{pageNum},#{pageSize}; CAST( dynamic_credit_score AS UNSIGNED ) DESC LIMIT #{pageNum},#{pageSize};
</select> </select>
@ -130,4 +153,16 @@
</where> </where>
order by q.create_time desc LIMIT #{pageNum},#{pageSize}; order by q.create_time desc LIMIT #{pageNum},#{pageSize};
</select> </select>
<select id="selectList1" resultMap="BsSgcYxjdQualifications">
select i.enterprise_name,q.*
from bs_sgc_yxjd_qualifications q
left join bs_sgc_yxjd_enterprise_info i on q.enterprise_id = i.id
<where>
<if test="eid!=null and eid!=''">
and q.enterprise_id=#{eid}
</if>
</where>
</select>
</mapper> </mapper>

Loading…
Cancel
Save