企业数据和履职记录任务记录
This commit is contained in:
parent
4e314ca192
commit
30bc3affd9
|
|
@ -31,6 +31,17 @@ public class CompaniesDto {
|
|||
@ApiModelProperty("行业id")
|
||||
private String baseinclassid;
|
||||
|
||||
@ApiModelProperty("数据类型 1、静态风险 2、动态风险")
|
||||
private Integer dataType;
|
||||
|
||||
public Integer getDataType() {
|
||||
return dataType;
|
||||
}
|
||||
|
||||
public void setDataType(Integer dataType) {
|
||||
this.dataType = dataType;
|
||||
}
|
||||
|
||||
public String getBaseinclassid() {
|
||||
return baseinclassid;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,68 @@
|
|||
package com.rzyc.bean.ent;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
|
||||
/**
|
||||
* @author dong
|
||||
* @date 2022-12-30 10:40
|
||||
* @Version V1.0
|
||||
*/
|
||||
@ApiModel("企业数量")
|
||||
public class CompanyEntNum {
|
||||
|
||||
@ApiModelProperty("企业总数")
|
||||
private Integer totalNum;
|
||||
|
||||
@ApiModelProperty("红色企业数")
|
||||
private Integer redNum;
|
||||
|
||||
@ApiModelProperty("橙色企业数")
|
||||
private Integer orangeNum;
|
||||
|
||||
@ApiModelProperty("黄色企业数")
|
||||
private Integer yellowNum;
|
||||
|
||||
@ApiModelProperty("蓝色企业数")
|
||||
private Integer blueNum;
|
||||
|
||||
public Integer getTotalNum() {
|
||||
return totalNum;
|
||||
}
|
||||
|
||||
public void setTotalNum(Integer totalNum) {
|
||||
this.totalNum = totalNum;
|
||||
}
|
||||
|
||||
public Integer getRedNum() {
|
||||
return redNum;
|
||||
}
|
||||
|
||||
public void setRedNum(Integer redNum) {
|
||||
this.redNum = redNum;
|
||||
}
|
||||
|
||||
public Integer getOrangeNum() {
|
||||
return orangeNum;
|
||||
}
|
||||
|
||||
public void setOrangeNum(Integer orangeNum) {
|
||||
this.orangeNum = orangeNum;
|
||||
}
|
||||
|
||||
public Integer getYellowNum() {
|
||||
return yellowNum;
|
||||
}
|
||||
|
||||
public void setYellowNum(Integer yellowNum) {
|
||||
this.yellowNum = yellowNum;
|
||||
}
|
||||
|
||||
public Integer getBlueNum() {
|
||||
return blueNum;
|
||||
}
|
||||
|
||||
public void setBlueNum(Integer blueNum) {
|
||||
this.blueNum = blueNum;
|
||||
}
|
||||
}
|
||||
|
|
@ -109,6 +109,7 @@ public interface SysEnterpriseMapper extends BaseMapper<SysEnterprise> {
|
|||
/*所有企业*/
|
||||
List<SysEnterprise> findByAreaCode(@Param("areaCode") String areaCode);
|
||||
|
||||
/*企业列表*/
|
||||
List<SysEnterprise>selectPCList(@Param("areaCode") String areaCode,
|
||||
@Param("entName")String entName,
|
||||
@Param("riskLevel")String riskLevel,
|
||||
|
|
@ -116,6 +117,14 @@ public interface SysEnterpriseMapper extends BaseMapper<SysEnterprise> {
|
|||
@Param("baseinclassid") String baseinclassid,
|
||||
@Param("inherentRisks") List<Integer> inherentRisks);
|
||||
|
||||
/*企业数量*/
|
||||
Integer countCompany(@Param("areaCode") String areaCode,
|
||||
@Param("entName")String entName,
|
||||
@Param("riskLevel")String riskLevel,
|
||||
@Param("isAdmin") Integer isAdmin,
|
||||
@Param("baseinclassid") String baseinclassid,
|
||||
@Param("inherentRisks") List<Integer> inherentRisks);
|
||||
|
||||
/*小程序企业列表*/
|
||||
List<SysEnterprise>wechatEnt(@Param("orgCode") String orgCode,
|
||||
@Param("entName")String entName,
|
||||
|
|
|
|||
|
|
@ -45,6 +45,12 @@ public class ListDetail implements Serializable {
|
|||
|
||||
private String isfinish;
|
||||
|
||||
@ApiModelProperty("任务id")
|
||||
private String taskId;
|
||||
|
||||
@ApiModelProperty("任务名")
|
||||
private String taskName;
|
||||
|
||||
/**
|
||||
* 删除状态
|
||||
*/
|
||||
|
|
@ -76,6 +82,22 @@ public class ListDetail implements Serializable {
|
|||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public String getTaskName() {
|
||||
return taskName;
|
||||
}
|
||||
|
||||
public void setTaskName(String taskName) {
|
||||
this.taskName = taskName;
|
||||
}
|
||||
|
||||
public String getTaskId() {
|
||||
return taskId;
|
||||
}
|
||||
|
||||
public void setTaskId(String taskId) {
|
||||
this.taskId = taskId;
|
||||
}
|
||||
|
||||
public String getSysUserId() {
|
||||
return sysUserId;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -839,6 +839,32 @@
|
|||
order by sys.ModifiedOn desc , sys.SysEnterpriseId desc
|
||||
</select>
|
||||
|
||||
|
||||
<select id="countCompany" resultType="java.lang.Integer">
|
||||
select count(sys.`SysEnterpriseId`)
|
||||
from SysEnterprise sys
|
||||
where 1=1
|
||||
<if test="2 == isAdmin">
|
||||
AND sys.State='启用'
|
||||
</if>
|
||||
<if test="null != inherentRisks and inherentRisks.size() > 0">
|
||||
and sys.InherentRisk in
|
||||
<foreach collection="inherentRisks" item="inherentRisk" open="(" close=")" separator=",">
|
||||
#{inherentRisk}
|
||||
</foreach>
|
||||
</if>
|
||||
AND FIND_IN_SET(#{areaCode},sys.area_path)
|
||||
<if test="null != entName and '' != entName">
|
||||
and sys.EntName like concat('%',#{entName},'%')
|
||||
</if>
|
||||
<if test="null != riskLevel and '' != riskLevel">
|
||||
And sys.RiskLevel like concat('',#{riskLevel},'%')
|
||||
</if>
|
||||
<if test="null != baseinclassid and '' != baseinclassid">
|
||||
and sys.work_class_id = #{baseinclassid}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<!--小程序企业-->
|
||||
<select id="wechatEnt" resultMap="BaseResultMap">
|
||||
select sys.*,org.OrgName
|
||||
|
|
|
|||
|
|
@ -9,6 +9,8 @@
|
|||
<result column="EndTime" jdbcType="TIMESTAMP" property="endtime" />
|
||||
<result column="OTCType" jdbcType="VARCHAR" property="otctype" />
|
||||
<result column="OTCId" jdbcType="VARCHAR" property="otcid" />
|
||||
<result column="task_id" jdbcType="VARCHAR" property="taskId" />
|
||||
<result column="taskName" jdbcType="VARCHAR" property="taskName" />
|
||||
<result column="IsFinish" jdbcType="VARCHAR" property="isfinish" />
|
||||
<result column="FinishTime" jdbcType="TIMESTAMP" property="finishtime" />
|
||||
<result column="CreatedOn" jdbcType="TIMESTAMP" property="createdon" />
|
||||
|
|
@ -143,7 +145,7 @@
|
|||
</delete>
|
||||
<insert id="insert" parameterType="com.rzyc.model.user.ListDetailWithBLOBs">
|
||||
insert into ListDetail (ListDetailId, ListFactorId, SysUserId,WorkTitle,
|
||||
StartTime, EndTime, OTCType,
|
||||
StartTime, EndTime, OTCType,task_id,
|
||||
OTCId, IsFinish, del_state,FinishTime,
|
||||
CreatedOn, CreatedBy, ModifiedOn,
|
||||
ModifiedBy, WorkCnt, WorkFile
|
||||
|
|
@ -152,7 +154,9 @@
|
|||
#{listfactorid,jdbcType=VARCHAR},
|
||||
#{sysUserId,jdbcType=VARCHAR},
|
||||
#{worktitle,jdbcType=VARCHAR},
|
||||
#{starttime,jdbcType=TIMESTAMP}, #{endtime,jdbcType=TIMESTAMP}, #{otctype,jdbcType=VARCHAR},
|
||||
#{starttime,jdbcType=TIMESTAMP}, #{endtime,jdbcType=TIMESTAMP},
|
||||
#{otctype,jdbcType=VARCHAR},
|
||||
#{taskId,jdbcType=VARCHAR},
|
||||
#{otcid,jdbcType=VARCHAR},
|
||||
#{isfinish,jdbcType=VARCHAR},
|
||||
#{delState,jdbcType=VARCHAR},
|
||||
|
|
@ -456,6 +460,7 @@
|
|||
WorkTitle = #{worktitle,jdbcType=VARCHAR},
|
||||
WorkCnt = #{workcnt,jdbcType=LONGVARCHAR},
|
||||
IsFinish = #{isfinish,jdbcType=VARCHAR},
|
||||
task_id = #{taskId,jdbcType=VARCHAR},
|
||||
FinishTime = #{finishtime,jdbcType=TIMESTAMP},
|
||||
StartTime = #{starttime,jdbcType=TIMESTAMP},
|
||||
EndTime = #{endtime,jdbcType=TIMESTAMP},
|
||||
|
|
@ -478,8 +483,10 @@
|
|||
|
||||
<!--履职记录-->
|
||||
<select id="performRecord" resultMap="ResultMapWithBLOBs">
|
||||
SELECT ld.* FROM ListDetail ld
|
||||
SELECT ld.*,ot.Subject taskName
|
||||
FROM ListDetail ld
|
||||
LEFT JOIN ListFactor lt ON ld.`ListFactorId` = lt.ListFactorId
|
||||
left join oatask ot on ld.task_id = ot.OATaskId
|
||||
WHERE (ld.`WorkTitle` LIKE #{condition} OR ld.`WorkCnt` LIKE #{condition})
|
||||
AND lt.`ListPerformId` = #{performId}
|
||||
AND lt.`SysYear` = #{year}
|
||||
|
|
|
|||
|
|
@ -453,7 +453,7 @@ public class PcPersonalController extends com.rzyc.controller.BaseController {
|
|||
if(null != sysUser){
|
||||
|
||||
//更新履职进度
|
||||
getFactor(sysUser.getSystitle());
|
||||
// getFactor(sysUser.getSystitle());
|
||||
|
||||
|
||||
UserDepart userDepart = listPerformMapper.userPerform(sysUser.getSysuserid());
|
||||
|
|
@ -1161,6 +1161,7 @@ public class PcPersonalController extends com.rzyc.controller.BaseController {
|
|||
System.out.println("chinaName -> "+chinaName);
|
||||
listDetail.setCreatedby(chinaName);
|
||||
listDetail.setModifiedby(chinaName);
|
||||
listDetail.setTaskId(addPerformRecordDto.getTaskId());
|
||||
listDetail.setIsfinish(IsFinish.YES.getFinish());
|
||||
listDetail.setDelState(DelState.NOT_DEL.getState());
|
||||
|
||||
|
|
@ -1231,6 +1232,7 @@ public class PcPersonalController extends com.rzyc.controller.BaseController {
|
|||
listDetail.setStarttime(DateUtils.parseString2Date(addPerformRecordDto.getStartTime(),"yyyy-MM-dd"));
|
||||
listDetail.setEndtime(DateUtils.parseString2Date(addPerformRecordDto.getEndTime(),"yyyy-MM-dd"));
|
||||
listDetail.setFinishtime(listDetail.getEndtime());
|
||||
listDetail.setTaskId(addPerformRecordDto.getTaskId());
|
||||
|
||||
String chinaName = getChinaName();
|
||||
System.out.println("chinaName -> "+chinaName);
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@ import com.rzyc.bean.check.dto.LawAddDto;
|
|||
import com.rzyc.bean.check.dto.TalkAddDto;
|
||||
import com.rzyc.bean.ent.*;
|
||||
import com.rzyc.bean.user.dto.WeChartLoginDto;
|
||||
import com.rzyc.enums.RiskLevel;
|
||||
import com.rzyc.model.*;
|
||||
import com.rzyc.model.check.*;
|
||||
import com.rzyc.model.ent.EntBillCon;
|
||||
|
|
@ -57,8 +58,10 @@ public class PcCompanyController extends com.rzyc.controller.BaseController {
|
|||
private final String ADMIN_ID = "8D35010B-EB9A-40EE-BDEB-CDAE969D5EF4";
|
||||
|
||||
/**
|
||||
* PC企业列表
|
||||
* @return
|
||||
* 企业列表
|
||||
* @version v1.0
|
||||
* @author dong
|
||||
* @date 2022/12/30 10:38
|
||||
*/
|
||||
@ApiOperation(value = "PC企业列表", notes = "PC企业列表")
|
||||
@PostMapping("/companies")
|
||||
|
|
@ -107,6 +110,85 @@ public class PcCompanyController extends com.rzyc.controller.BaseController {
|
|||
return singleResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 企业数量统计
|
||||
* @version v1.0
|
||||
* @author dong
|
||||
* @date 2022/12/30 10:39
|
||||
*/
|
||||
@ApiOperation(value = "企业数量统计", notes = "企业数量统计")
|
||||
@PostMapping("/companyEntNum")
|
||||
@ResponseBody
|
||||
public SingleResult<CompanyEntNum> companyEntNum(@Valid CompaniesDto companiesDto)throws Exception{
|
||||
SingleResult<CompanyEntNum> result = new SingleResult<>();
|
||||
|
||||
String userId = getUserId();
|
||||
|
||||
//是否为管理员账号 1:是 2:否
|
||||
Integer isAdmin = 2;
|
||||
if(ADMIN_ID.equals(userId)){
|
||||
isAdmin = 1;
|
||||
}
|
||||
|
||||
String areaCode = companiesDto.getOrgCode();
|
||||
if(StringUtils.isBlank(areaCode)){
|
||||
areaCode = getUserArea(userId);
|
||||
}
|
||||
|
||||
CompanyEntNum companyEntNum = new CompanyEntNum();
|
||||
|
||||
//企业总数
|
||||
Integer totalNum = sysEnterpriseMapper.countCompany(areaCode,companiesDto.getEntName(),companiesDto.getRiskLevel(),isAdmin,companiesDto.getBaseinclassid(),new ArrayList<>());
|
||||
companyEntNum.setTotalNum(totalNum);
|
||||
|
||||
if(1 == companiesDto.getDataType()){
|
||||
//红色企业
|
||||
List<Integer> redRisks = new ArrayList<>();
|
||||
redRisks.add(RiskLevel.RED.getLevel());
|
||||
Integer redNum = sysEnterpriseMapper.countCompany(areaCode,companiesDto.getEntName(),companiesDto.getRiskLevel(),isAdmin,companiesDto.getBaseinclassid(),redRisks);
|
||||
companyEntNum.setRedNum(redNum);
|
||||
|
||||
//橙色企业
|
||||
List<Integer> orangeRisks = new ArrayList<>();
|
||||
orangeRisks.add(RiskLevel.ORANGE.getLevel());
|
||||
Integer orangeNum = sysEnterpriseMapper.countCompany(areaCode,companiesDto.getEntName(),companiesDto.getRiskLevel(),isAdmin,companiesDto.getBaseinclassid(),orangeRisks);
|
||||
companyEntNum.setOrangeNum(orangeNum);
|
||||
|
||||
//橙色企业
|
||||
List<Integer> yellowRisks = new ArrayList<>();
|
||||
yellowRisks.add(RiskLevel.YELLOW.getLevel());
|
||||
Integer yellowNum = sysEnterpriseMapper.countCompany(areaCode,companiesDto.getEntName(),companiesDto.getRiskLevel(),isAdmin,companiesDto.getBaseinclassid(),yellowRisks);
|
||||
companyEntNum.setYellowNum(yellowNum);
|
||||
|
||||
//橙色企业
|
||||
List<Integer> blueRisks = new ArrayList<>();
|
||||
blueRisks.add(RiskLevel.BLUE.getLevel());
|
||||
Integer blueNum = sysEnterpriseMapper.countCompany(areaCode,companiesDto.getEntName(),companiesDto.getRiskLevel(),isAdmin,companiesDto.getBaseinclassid(),blueRisks);
|
||||
companyEntNum.setBlueNum(blueNum);
|
||||
}else{
|
||||
Integer redNum = sysEnterpriseMapper.countCompany(areaCode,companiesDto.getEntName(),RiskLevel.RED.getLevelDesc(),isAdmin,companiesDto.getBaseinclassid(),null);
|
||||
companyEntNum.setRedNum(redNum);
|
||||
|
||||
//橙色企业
|
||||
Integer orangeNum = sysEnterpriseMapper.countCompany(areaCode,companiesDto.getEntName(),RiskLevel.ORANGE.getLevelDesc(),isAdmin,companiesDto.getBaseinclassid(),null);
|
||||
companyEntNum.setOrangeNum(orangeNum);
|
||||
|
||||
//橙色企业
|
||||
Integer yellowNum = sysEnterpriseMapper.countCompany(areaCode,companiesDto.getEntName(),RiskLevel.YELLOW.getLevelDesc(),isAdmin,companiesDto.getBaseinclassid(),null);
|
||||
companyEntNum.setYellowNum(yellowNum);
|
||||
|
||||
//橙色企业
|
||||
Integer blueNum = sysEnterpriseMapper.countCompany(areaCode,companiesDto.getEntName(),RiskLevel.BLUE.getLevelDesc(),isAdmin,companiesDto.getBaseinclassid(),null);
|
||||
companyEntNum.setBlueNum(blueNum);
|
||||
}
|
||||
|
||||
|
||||
result.setData(companyEntNum);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* PC企业软删除
|
||||
* @return
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user