bug修改

This commit is contained in:
guoshengxiong 2024-04-23 00:06:32 +08:00
parent 4b1293b58e
commit a8fe40f59b
25 changed files with 250 additions and 130 deletions

View File

@ -163,6 +163,8 @@ public class SystemUserController {
@ApiImplicitParams({ @ApiImplicitParams({
@ApiImplicitParam(name = "projectSn", required = true, value = "项目SN", paramType = "body"), @ApiImplicitParam(name = "projectSn", required = true, value = "项目SN", paramType = "body"),
@ApiImplicitParam(name = "workerName", required = false, value = "姓名", paramType = "body"), @ApiImplicitParam(name = "workerName", required = false, value = "姓名", paramType = "body"),
@ApiImplicitParam(name = "workerId", required = false, value = "劳务人员id", paramType = "body"),
@ApiImplicitParam(name = "enterpriseId", required = false, value = "企业id", paramType = "body"),
}) })
@PostMapping(value = "/getProjectChilderSystemUserList") @PostMapping(value = "/getProjectChilderSystemUserList")
public Result<List<SystemUser>> getProjectChilderSystemUserList(@RequestBody Map<String, Object> map) { public Result<List<SystemUser>> getProjectChilderSystemUserList(@RequestBody Map<String, Object> map) {

View File

@ -25,7 +25,7 @@ import io.swagger.annotations.ApiModelProperty;
public class BaseAction implements Serializable { public class BaseAction implements Serializable {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
/**资源ID*/ /**资源ID*/
@TableId(type = IdType.ASSIGN_ID) @TableId(type = IdType.ASSIGN_ID)
@ApiModelProperty(value="资源ID") @ApiModelProperty(value="资源ID")
private java.lang.Long actionId ; private java.lang.Long actionId ;
@ -43,7 +43,6 @@ public class BaseAction implements Serializable {
private java.lang.String actionDesc ; private java.lang.String actionDesc ;
/**资源父节点(所属菜单)*/ /**资源父节点(所属菜单)*/
@Excel(name = "资源父节点(所属菜单)", width = 15) @Excel(name = "资源父节点(所属菜单)", width = 15)
@ApiModelProperty(value="资源父节点(所属菜单)") @ApiModelProperty(value="资源父节点(所属菜单)")
private java.lang.Long menuId ; private java.lang.Long menuId ;
/**优先级 越小越靠前*/ /**优先级 越小越靠前*/

View File

@ -20,6 +20,12 @@
<if test="workerName != null and workerName != ''"> <if test="workerName != null and workerName != ''">
and d.worker_name like CONCAT(CONCAT('%', #{workerName}), '%') and d.worker_name like CONCAT(CONCAT('%', #{workerName}), '%')
</if> </if>
<if test="workerId != null and workerId != ''">
and d.id = #{workerId}
</if>
<if test="enterpriseId != null and enterpriseId != ''">
and d.enterprise_id = #{enterpriseId}
</if>
</select> </select>
<select id="findByUsername" resultType="com.zhgd.xmgl.modules.basicdata.entity.SystemUser" parameterType="string"> <select id="findByUsername" resultType="com.zhgd.xmgl.modules.basicdata.entity.SystemUser" parameterType="string">
select * select *

View File

@ -15,6 +15,7 @@ import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import springfox.documentation.annotations.ApiIgnore;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
@ -105,5 +106,4 @@ public class DangerousEngineeringControlItemController {
} }
} }

View File

@ -20,6 +20,7 @@ import org.apache.commons.collections.MapUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import springfox.documentation.annotations.ApiIgnore;
/** /**
@ -76,19 +77,8 @@ public class DangerousEngineeringRecordController {
@ApiOperation(value = "编辑现场危大工程信息", notes = "编辑现场危大工程信息" , httpMethod="POST") @ApiOperation(value = "编辑现场危大工程信息", notes = "编辑现场危大工程信息" , httpMethod="POST")
@PostMapping(value = "/edit") @PostMapping(value = "/edit")
public Result<DangerousEngineeringRecord> edit(@RequestBody DangerousEngineeringRecord dangerousEngineeringRecord) { public Result<DangerousEngineeringRecord> edit(@RequestBody DangerousEngineeringRecord dangerousEngineeringRecord) {
Result<DangerousEngineeringRecord> result = new Result<DangerousEngineeringRecord>(); dangerousEngineeringRecordService.edit(dangerousEngineeringRecord);
DangerousEngineeringRecord dangerousEngineeringRecordEntity = dangerousEngineeringRecordService.getById(dangerousEngineeringRecord.getId()); return Result.ok();
if(dangerousEngineeringRecordEntity==null) {
result.error500(MessageUtil.get("notFindErr"));
}else {
boolean ok = dangerousEngineeringRecordService.updateById(dangerousEngineeringRecord);
if(ok) {
result.successMsg(MessageUtil.get("editSucess"));
}
}
return result;
} }
/** /**
@ -119,13 +109,23 @@ public class DangerousEngineeringRecordController {
* @param * @param
* @return * @return
*/ */
@ApiOperation(value = "通过id查询现场危大工程信息", notes = "通过id查询现场危大工程信息", httpMethod = "POST") @ApiOperation(value = "通过id查询现场危大工程信息", notes = "通过id查询现场危大工程信息", httpMethod = "POST")
@ApiImplicitParam(name = "id", value = "现场危大工程ID", paramType = "body", required = true, dataType = "Integer") @ApiImplicitParam(name = "id", value = "现场危大工程ID", paramType = "body", required = true, dataType = "Integer")
@PostMapping(value = "/queryById") @PostMapping(value = "/queryById")
public Result<EntityMap> getDangerousEngineeringById(@RequestBody Map<String,Object> map) { public Result<EntityMap> getDangerousEngineeringById(@RequestBody Map<String, Object> map) {
return Result.success(dangerousEngineeringRecordService.getDangerousEngineeringById(map)); return Result.success(dangerousEngineeringRecordService.getDangerousEngineeringById(map));
} }
@ApiOperation(value = "结束危大工程", notes = "结束危大工程", httpMethod = "POST")
@ApiImplicitParams({
@ApiImplicitParam(name = "id", value = "现场危大工程ID", paramType = "body", required = true, dataType = "String"),
})
@PostMapping(value = "/endEngineer")
public Result endEngineer(@ApiIgnore @RequestBody Map<String, Object> paramMap) {
dangerousEngineeringRecordService.endEngineer(paramMap);
return Result.ok();
}
} }

View File

@ -30,11 +30,9 @@ public class DangerousEngineeringControlItem implements Serializable {
/**危大工程ID*/ /**危大工程ID*/
@Excel(name = "危大工程ID", width = 15) @Excel(name = "危大工程ID", width = 15)
@ApiModelProperty(value="危大工程ID") @ApiModelProperty(value="危大工程ID")
private java.lang.Long engineeringId ; private java.lang.Long engineeringId ;
/**管控要点ID*/ /**管控要点ID*/
@Excel(name = "管控要点ID", width = 15) @Excel(name = "管控要点ID", width = 15)
@ApiModelProperty(value="管控要点ID") @ApiModelProperty(value="管控要点ID")
private java.lang.Long controlId ; private java.lang.Long controlId ;
/**管控要点分类*/ /**管控要点分类*/

View File

@ -115,19 +115,26 @@ public class DangerousEngineeringRecord implements Serializable {
private java.lang.Integer securityConstructionSchemeType ; private java.lang.Integer securityConstructionSchemeType ;
/**安全专项施工方案附件*/ /**安全专项施工方案附件*/
@Excel(name = "安全专项施工方案附件", width = 15) @Excel(name = "安全专项施工方案附件", width = 15)
@ApiModelProperty(value="安全专项施工方案附件") @ApiModelProperty(value = "安全专项施工方案附件")
private java.lang.String securityConstructionSchemeFile ; private java.lang.String securityConstructionSchemeFile;
/**是否完成专项施工方案交底1未完成2完成*/ /**
* 是否完成专项施工方案交底1未完成2完成
*/
@Excel(name = "是否完成专项施工方案交底1未完成2完成", width = 15) @Excel(name = "是否完成专项施工方案交底1未完成2完成", width = 15)
@ApiModelProperty(value="是否完成专项施工方案交底1未完成2完成") @ApiModelProperty(value = "是否完成专项施工方案交底1未完成2完成")
private java.lang.Integer specialConstructionSchemeType ; private java.lang.Integer specialConstructionSchemeType;
/**专项施工方案附件*/ /**
* 专项施工方案附件
*/
@Excel(name = "专项施工方案附件", width = 15) @Excel(name = "专项施工方案附件", width = 15)
@ApiModelProperty(value="专项施工方案附件") @ApiModelProperty(value = "专项施工方案附件")
private java.lang.String specialConstructionSchemeFile ; private java.lang.String specialConstructionSchemeFile;
@ApiModelProperty(value = "责任人id")
@TableField(exist = false) private java.lang.Long personLiableId;
@ApiModelProperty(value="类别描述列表") @ApiModelProperty(value = "已结束1是0否")
private java.lang.Integer isEnd;
@TableField(exist = false)
@ApiModelProperty(value = "类别描述列表")
private List<DangerousEngineeringChooseTypeDescribe> typeDescribeList; private List<DangerousEngineeringChooseTypeDescribe> typeDescribeList;
@TableField(exist = false) @TableField(exist = false)

View File

@ -24,14 +24,13 @@ import io.swagger.annotations.ApiModelProperty;
public class DangerousEngineeringTypeControlContent implements Serializable { public class DangerousEngineeringTypeControlContent implements Serializable {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
/**id*/ /**id*/
@TableId(type = IdType.ASSIGN_ID) @TableId(type = IdType.ASSIGN_ID)
@ApiModelProperty(value="id") @ApiModelProperty(value="id")
private java.lang.Long id ; private java.lang.Long id ;
/**分类ID*/ /**分类ID*/
@Excel(name = "分类ID", width = 15) @Excel(name = "分类ID", width = 15)
@ApiModelProperty(value="分类ID") @ApiModelProperty(value="分类ID")
private java.lang.Long typeId ; private java.lang.Long typeId ;
/**管控要的分类*/ /**管控要的分类*/
@ -57,6 +56,5 @@ public class DangerousEngineeringTypeControlContent implements Serializable {
@TableField(exist = false) @TableField(exist = false)
@ApiModelProperty(value="分类描述ID") @ApiModelProperty(value="分类描述ID")
private java.lang.Long describeId ; private java.lang.Long describeId ;
} }

View File

@ -10,7 +10,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/** /**
* @Description: 危大工程类别描述 * @Description: 危大工程类别描述
* @author pds * @author pds
* @date 2021-06-28 * @date 2021-06-28
* @version V1.0 * @version V1.0
*/ */
@Mapper @Mapper
@ -19,4 +19,6 @@ public interface DangerousEngineeringTypeDescribeMapper extends BaseMapper<Dange
List<DangerousEngineeringTypeDescribe> selectTypeDescribeList(Map<String, Object> map); List<DangerousEngineeringTypeDescribe> selectTypeDescribeList(Map<String, Object> map);
List<DangerousEngineeringTypeDescribe> selectTypeDescribeListByTypeId(Map<String, Object> map); List<DangerousEngineeringTypeDescribe> selectTypeDescribeListByTypeId(Map<String, Object> map);
Boolean isSuperDangerByEngineeringId(String id);
} }

View File

@ -7,6 +7,5 @@
select * select *
from dangerous_engineering_choose_type_describe from dangerous_engineering_choose_type_describe
where engineering_id=#{engineeringId} where engineering_id=#{engineeringId}
</select> </select>
</mapper> </mapper>

View File

@ -7,16 +7,19 @@
(case when a.build_end_time is not null and a.build_end_time!='' and a.build_end_time &lt;DATE_FORMAT(now(),"%Y-%m-%d") then 3 (case when a.build_end_time is not null and a.build_end_time!='' and a.build_end_time &lt;DATE_FORMAT(now(),"%Y-%m-%d") then 3
when a.build_end_time is not null and a.build_end_time!='' and a.build_start_time is not null and a.build_start_time!='' when a.build_end_time is not null and a.build_end_time!='' and a.build_start_time is not null and a.build_start_time!=''
and a.build_end_time >=DATE_FORMAT(now(),"%Y-%m-%d") and a.build_start_time &lt;=DATE_FORMAT(now(),"%Y-%m-%d") then 2 and a.build_end_time >=DATE_FORMAT(now(),"%Y-%m-%d") and a.build_start_time &lt;=DATE_FORMAT(now(),"%Y-%m-%d") then 2
else 1 END) engineering_state else 1 END) engineering_state
from dangerous_engineering_record a from dangerous_engineering_record a
LEFT JOIN (SELECT engineering_id,COUNT(1) hidden_danger_num LEFT JOIN (SELECT engineering_id,COUNT(1) hidden_danger_num
from hidden_danger_inspection_record from hidden_danger_inspection_record
WHERE project_sn=#{param.projectSn} AND `status` in (2,3) AND engineering_id is not NULL WHERE project_sn=#{param.projectSn} AND `status` in (2,3) AND engineering_id is not NULL
GROUP BY engineering_id) tp ON a.id=tp.engineering_id GROUP BY engineering_id) tp ON a.id=tp.engineering_id
WHERE a.project_sn=#{param.projectSn} WHERE a.project_sn=#{param.projectSn}
<if test="param.engineeringName!=null and param.engineeringName!=''"> <if test="param.engineeringName != null and param.engineeringName != ''">
and a.engineering_name like CONCAT(CONCAT('%',#{param.engineeringName}),'%') and a.engineering_name like CONCAT(CONCAT('%',#{param.engineeringName}),'%')
</if> </if>
<if test="param.personLiableId != null and param.personLiableId != ''">
and a.person_liable_id = #{param.personLiableId}
</if>
order by a.create_time desc order by a.create_time desc
</select> </select>
<select id="getDangerousEngineeringById" resultType="com.zhgd.jeecg.common.mybatis.EntityMap"> <select id="getDangerousEngineeringById" resultType="com.zhgd.jeecg.common.mybatis.EntityMap">

View File

@ -38,6 +38,5 @@
SELECT b.* SELECT b.*
from dangerous_engineering_type_describe_control a INNER JOIN dangerous_engineering_type_control_content b ON a.control_id=b.id from dangerous_engineering_type_describe_control a INNER JOIN dangerous_engineering_type_control_content b ON a.control_id=b.id
WHERE a.describe_id=#{describeId} WHERE a.describe_id=#{describeId}
</select> </select>
</mapper> </mapper>

View File

@ -9,10 +9,18 @@
ORDER BY a.type_id ORDER BY a.type_id
</select> </select>
<select id="selectTypeDescribeListByTypeId" resultType="com.zhgd.xmgl.modules.dangerous.entity.DangerousEngineeringTypeDescribe"> <select id="selectTypeDescribeListByTypeId"
resultType="com.zhgd.xmgl.modules.dangerous.entity.DangerousEngineeringTypeDescribe">
SELECT a.id,a.describe_name,a.type_id,a.danger_type,b.type_name SELECT a.id,a.describe_name,a.type_id,a.danger_type,b.type_name
from dangerous_engineering_type_describe a INNER JOIN dangerous_engineering_type b ON a.type_id=b.id from dangerous_engineering_type_describe a INNER JOIN dangerous_engineering_type b ON a.type_id=b.id
WHERE a.type_id=#{typeId} WHERE a.type_id=#{typeId}
ORDER BY a.type_id ORDER BY a.type_id
</select> </select>
<select id="isSuperDangerByEngineeringId" resultType="java.lang.Boolean">
SELECT ifnull(if(sum(if(a.danger_type=2,1,0))>0,1,0),0)
from dangerous_engineering_type_describe a INNER JOIN dangerous_engineering_choose_type_describe b ON
a.id=b.describe_id
where b.engineering_id=#{engineeringId}
</select>
</mapper> </mapper>

View File

@ -21,4 +21,7 @@ public interface IDangerousEngineeringRecordService extends IService<DangerousEn
void saveDangerousEngineeringRecord(DangerousEngineeringRecord dangerousEngineeringRecord); void saveDangerousEngineeringRecord(DangerousEngineeringRecord dangerousEngineeringRecord);
void edit(DangerousEngineeringRecord dangerousEngineeringRecord);
void endEngineer(Map<String, Object> paramMap);
} }

View File

@ -1,21 +1,23 @@
package com.zhgd.xmgl.modules.dangerous.service.impl; package com.zhgd.xmgl.modules.dangerous.service.impl;
import cn.hutool.core.collection.CollUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.zhgd.jeecg.common.execption.OpenAlertException;
import com.zhgd.jeecg.common.mybatis.EntityMap; import com.zhgd.jeecg.common.mybatis.EntityMap;
import com.zhgd.xmgl.modules.basicdata.service.impl.SystemUserServiceImpl;
import com.zhgd.xmgl.modules.dangerous.entity.*; import com.zhgd.xmgl.modules.dangerous.entity.*;
import com.zhgd.xmgl.modules.dangerous.mapper.DangerousEngineeringChooseTypeDescribeMapper; import com.zhgd.xmgl.modules.dangerous.mapper.*;
import com.zhgd.xmgl.modules.dangerous.mapper.DangerousEngineeringProgressRecordMapper;
import com.zhgd.xmgl.modules.dangerous.mapper.DangerousEngineeringRecordMapper;
import com.zhgd.xmgl.modules.dangerous.mapper.DangerousEngineeringTypeControlContentMapper;
import com.zhgd.xmgl.modules.dangerous.service.IDangerousEngineeringControlItemService; import com.zhgd.xmgl.modules.dangerous.service.IDangerousEngineeringControlItemService;
import com.zhgd.xmgl.modules.dangerous.service.IDangerousEngineeringRecordService; import com.zhgd.xmgl.modules.dangerous.service.IDangerousEngineeringRecordService;
import com.zhgd.xmgl.modules.worker.mapper.EnterpriseInfoMapper; import com.zhgd.xmgl.modules.worker.mapper.EnterpriseInfoMapper;
import com.zhgd.xmgl.security.util.SecurityUtils;
import com.zhgd.xmgl.util.MessageUtil;
import org.apache.commons.collections.MapUtils; import org.apache.commons.collections.MapUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import java.util.*; import java.util.*;
@ -23,12 +25,14 @@ import java.util.*;
/** /**
* @Description: 现场危大工程 * @Description: 现场危大工程
* @author pds * @author pds
* @date 2021-06-28 * @date 2021-06-28
* @version V1.0 * @version V1.0
*/ */
@Service @Service
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public class DangerousEngineeringRecordServiceImpl extends ServiceImpl<DangerousEngineeringRecordMapper, DangerousEngineeringRecord> implements IDangerousEngineeringRecordService { public class DangerousEngineeringRecordServiceImpl extends ServiceImpl<DangerousEngineeringRecordMapper, DangerousEngineeringRecord> implements IDangerousEngineeringRecordService {
@Autowired
private DangerousEngineeringAcceptanceCheckMapper dangerousEngineeringAcceptanceCheckMapper;
@Autowired @Autowired
private DangerousEngineeringRecordMapper dangerousEngineeringRecordMapper; private DangerousEngineeringRecordMapper dangerousEngineeringRecordMapper;
@Autowired @Autowired
@ -41,35 +45,33 @@ public class DangerousEngineeringRecordServiceImpl extends ServiceImpl<Dangerous
private IDangerousEngineeringControlItemService dangerousEngineeringControlItemService; private IDangerousEngineeringControlItemService dangerousEngineeringControlItemService;
@Autowired @Autowired
private DangerousEngineeringProgressRecordMapper dangerousEngineeringProgressRecordMapper; private DangerousEngineeringProgressRecordMapper dangerousEngineeringProgressRecordMapper;
@Autowired
private SystemUserServiceImpl systemUserService;
@Autowired
private DangerousEngineeringTypeDescribeMapper dangerousEngineeringTypeDescribeMapper;
@Autowired
private DangerousEngineeringControlItemMapper dangerousEngineeringControlItemMapper;
@Override @Override
public IPage<EntityMap> queryDangerousEngineeringPageList(Map<String, Object> map) { public IPage<EntityMap> queryDangerousEngineeringPageList(Map<String, Object> map) {
int pageNo = Integer.parseInt(map.getOrDefault("pageNo", 1).toString()); int pageNo = Integer.parseInt(map.getOrDefault("pageNo", 1).toString());
int pageSize = Integer.parseInt(map.getOrDefault("pageSize", 10).toString()); int pageSize = Integer.parseInt(map.getOrDefault("pageSize", 10).toString());
Page<EntityMap> page = new Page<>(pageNo, pageSize); Page<EntityMap> page = new Page<>(pageNo, pageSize);
List<EntityMap> list=dangerousEngineeringRecordMapper.queryDangerousEngineeringPageList(page, map); if (systemUserService.isSubProject()) {
if(list.size()>0){ map.put("personLiableId", SecurityUtils.getUser().getUserId());
for(EntityMap data:list){ }
/*String responsibilityCompany= MapUtils.getString(data,"responsibilityCompany"); List<EntityMap> list = dangerousEngineeringRecordMapper.queryDangerousEngineeringPageList(page, map);
StringBuilder stringBuilder=new StringBuilder(); if (list.size() > 0) {
if(StringUtils.isNotEmpty(responsibilityCompany)){ for (EntityMap data : list) {
for (String enterpriseId:responsibilityCompany.split(",")){ String id = MapUtils.getString(data, "id");
EnterpriseInfo info=enterpriseInfoMapper.selectById(enterpriseId); List<DangerousEngineeringChooseTypeDescribe> chooseTypeDescribeList = dangerousEngineeringChooseTypeDescribeMapper.getChooseTypeDescribeList(id);
if(info!=null) { data.put("choose_type_describe_list", chooseTypeDescribeList);
if (stringBuilder.length() > 0) { Map<String, Object> count = dangerousEngineeringControlItemService.selectEngineeringControlItemCount(id);
stringBuilder.append(","); data.put("control_item_count", count);
} DangerousEngineeringProgressRecord progressRecord = dangerousEngineeringProgressRecordMapper.selectNewestEngineeringProgressRecord(id);
stringBuilder.append(info.getEnterpriseName()); data.put("progressRecord", progressRecord);
} Boolean isSuperDanger = dangerousEngineeringTypeDescribeMapper.isSuperDangerByEngineeringId(id);
} data.put("isSuperDanger", isSuperDanger);
}
data.put("responsibility_company_name",stringBuilder.toString());*/
List<DangerousEngineeringChooseTypeDescribe> chooseTypeDescribeList=dangerousEngineeringChooseTypeDescribeMapper.getChooseTypeDescribeList(MapUtils.getString(data,"id"));
data.put("choose_type_describe_list",chooseTypeDescribeList);
Map<String, Object> count=dangerousEngineeringControlItemService.selectEngineeringControlItemCount(MapUtils.getString(data,"id"));
data.put("control_item_count",count);
DangerousEngineeringProgressRecord progressRecord=dangerousEngineeringProgressRecordMapper.selectNewestEngineeringProgressRecord(MapUtils.getString(data,"id"));
data.put("progressRecord",progressRecord);
} }
} }
return page.setRecords(list); return page.setRecords(list);
@ -77,24 +79,10 @@ public class DangerousEngineeringRecordServiceImpl extends ServiceImpl<Dangerous
@Override @Override
public EntityMap getDangerousEngineeringById(Map<String, Object> map) { public EntityMap getDangerousEngineeringById(Map<String, Object> map) {
EntityMap data=dangerousEngineeringRecordMapper.getDangerousEngineeringById(map); EntityMap data = dangerousEngineeringRecordMapper.getDangerousEngineeringById(map);
if (data!=null){ if (data != null) {
/*String responsibilityCompany= MapUtils.getString(data,"responsibilityCompany"); List<DangerousEngineeringChooseTypeDescribe> chooseTypeDescribeList = dangerousEngineeringChooseTypeDescribeMapper.getChooseTypeDescribeList(MapUtils.getString(data, "id"));
StringBuilder stringBuilder=new StringBuilder(); data.put("choose_type_describe_list", chooseTypeDescribeList);
if(StringUtils.isNotEmpty(responsibilityCompany)){
for (String enterpriseId:responsibilityCompany.split(",")){
EnterpriseInfo info=enterpriseInfoMapper.selectById(enterpriseId);
if(info!=null) {
if (stringBuilder.length() > 0) {
stringBuilder.append(",");
}
stringBuilder.append(info.getEnterpriseName());
}
}
}
data.put("responsibility_company_name",stringBuilder.toString());*/
List<DangerousEngineeringChooseTypeDescribe> chooseTypeDescribeList=dangerousEngineeringChooseTypeDescribeMapper.getChooseTypeDescribeList(MapUtils.getString(data,"id"));
data.put("choose_type_describe_list",chooseTypeDescribeList);
} }
return data; return data;
} }
@ -103,21 +91,31 @@ public class DangerousEngineeringRecordServiceImpl extends ServiceImpl<Dangerous
public void saveDangerousEngineeringRecord(DangerousEngineeringRecord dangerousEngineeringRecord) { public void saveDangerousEngineeringRecord(DangerousEngineeringRecord dangerousEngineeringRecord) {
dangerousEngineeringRecord.setCreateTime(new Date()); dangerousEngineeringRecord.setCreateTime(new Date());
dangerousEngineeringRecordMapper.insert(dangerousEngineeringRecord); dangerousEngineeringRecordMapper.insert(dangerousEngineeringRecord);
if(dangerousEngineeringRecord.getTypeDescribeList()!=null&&dangerousEngineeringRecord.getTypeDescribeList().size()>0){ replaceTypeDescribeAndControllerContent(dangerousEngineeringRecord);
for (DangerousEngineeringChooseTypeDescribe typeDescribe:dangerousEngineeringRecord.getTypeDescribeList()){ }
typeDescribe.setEngineeringId(dangerousEngineeringRecord.getId());
private void replaceTypeDescribeAndControllerContent(DangerousEngineeringRecord dangerousEngineeringRecord) {
Long id = dangerousEngineeringRecord.getId();
dangerousEngineeringChooseTypeDescribeMapper.delete(new LambdaQueryWrapper<DangerousEngineeringChooseTypeDescribe>()
.eq(DangerousEngineeringChooseTypeDescribe::getEngineeringId, id)
);
if (dangerousEngineeringRecord.getTypeDescribeList() != null && dangerousEngineeringRecord.getTypeDescribeList().size() > 0) {
for (DangerousEngineeringChooseTypeDescribe typeDescribe : dangerousEngineeringRecord.getTypeDescribeList()) {
typeDescribe.setEngineeringId(id);
dangerousEngineeringChooseTypeDescribeMapper.insert(typeDescribe); dangerousEngineeringChooseTypeDescribeMapper.insert(typeDescribe);
} }
} }
dangerousEngineeringControlItemMapper.delete(new LambdaQueryWrapper<DangerousEngineeringControlItem>()
.eq(DangerousEngineeringControlItem::getEngineeringId, id));
//保存管控要点 //保存管控要点
if(dangerousEngineeringRecord.getControlItemList()!=null&&dangerousEngineeringRecord.getControlItemList().size()>0){ if (dangerousEngineeringRecord.getControlItemList() != null && dangerousEngineeringRecord.getControlItemList().size() > 0) {
Map<String,Object> param=new HashMap<>(); Map<String, Object> param = new HashMap<>();
param.put("list",dangerousEngineeringRecord.getControlItemList()); param.put("list", dangerousEngineeringRecord.getControlItemList());
List<DangerousEngineeringTypeControlContent> list=dangerousEngineeringTypeControlContentMapper.selectUserCheckControlContentList(param); List<DangerousEngineeringTypeControlContent> list = dangerousEngineeringTypeControlContentMapper.selectUserCheckControlContentList(param);
List<DangerousEngineeringControlItem> itemList=new ArrayList<>(); List<DangerousEngineeringControlItem> itemList = new ArrayList<>();
for (DangerousEngineeringTypeControlContent content:list){ for (DangerousEngineeringTypeControlContent content : list) {
DangerousEngineeringControlItem item=new DangerousEngineeringControlItem(); DangerousEngineeringControlItem item = new DangerousEngineeringControlItem();
item.setEngineeringId(dangerousEngineeringRecord.getId()); item.setEngineeringId(id);
item.setControlTypeName(content.getControlTypeName()); item.setControlTypeName(content.getControlTypeName());
item.setControlContent(content.getControlContent()); item.setControlContent(content.getControlContent());
item.setControlId(content.getId()); item.setControlId(content.getId());
@ -128,4 +126,38 @@ public class DangerousEngineeringRecordServiceImpl extends ServiceImpl<Dangerous
dangerousEngineeringControlItemService.saveBatch(itemList); dangerousEngineeringControlItemService.saveBatch(itemList);
} }
} }
@Override
public void edit(DangerousEngineeringRecord dangerousEngineeringRecord) {
Long id = dangerousEngineeringRecord.getId();
DangerousEngineeringRecord dangerousEngineeringRecordEntity = getById(id);
if (dangerousEngineeringRecordEntity == null) {
throw new OpenAlertException(MessageUtil.get("notFindErr"));
}
updateById(dangerousEngineeringRecord);
replaceTypeDescribeAndControllerContent(dangerousEngineeringRecord);
}
@Override
public void endEngineer(Map<String, Object> paramMap) {
Long id = MapUtils.getLong(paramMap, "id");
paramMap.put("engineeringId", id);
EntityMap data = dangerousEngineeringRecordMapper.getDangerousEngineeringById(paramMap);
Integer hiddenDangerNum = MapUtils.getInteger(data, "hiddenDangerNum");
if (hiddenDangerNum > 0) {
throw new OpenAlertException("当前存在未销隐患");
}
List<EntityMap> list = dangerousEngineeringAcceptanceCheckMapper.selectAcceptanceCheckList(paramMap);
if (CollUtil.isNotEmpty(list)) {
EntityMap entityMap = list.get(list.size() - 1);
Integer acceptanceResult = MapUtils.getInteger(entityMap, "acceptanceResult");
if (!Objects.equals(acceptanceResult, 1)) {
throw new OpenAlertException("当前验收未合格");
}
}
DangerousEngineeringRecord record = new DangerousEngineeringRecord();
record.setId(id);
record.setIsEnd(1);
baseMapper.updateById(record);
}
} }

View File

@ -42,7 +42,7 @@ public interface EnterpriseInfoMapper extends BaseMapper<EnterpriseInfo> {
IPage<EntityMap> getXzSupplierPage(@Param("map") Map<String, Object> map, @Param("page") Page<EnterpriseInfo> qp); IPage<EntityMap> getXzSupplierPage(@Param("map") Map<String, Object> map, @Param("page") Page<EnterpriseInfo> qp);
EnterpriseInfo getXzSupplierByUserId(Map<String, Object> map); EnterpriseInfo getXzSupplierByUserId(Long userId);
EnterpriseInfo getXzSupplierBySocialCode(Map<String, Object> map); EnterpriseInfo getXzSupplierBySocialCode(Map<String, Object> map);

View File

@ -428,6 +428,10 @@
#{item} #{item}
</foreach> </foreach>
</if> </if>
<if test="supplierEnterpriseId != null and supplierEnterpriseId != ''">
AND (w1.enterprise_id = #{supplierEnterpriseId} OR w1.enterprise_id IN ( SELECT t.enterprise_id FROM
project_enterprise t WHERE find_in_set(#{projectEnterpriseId}, ancestors) ))
</if>
</where> </where>
</select> </select>
<select id="selectPresenceWorkerPersonTypeTotal" resultType="java.util.Map" parameterType="java.util.Map"> <select id="selectPresenceWorkerPersonTypeTotal" resultType="java.util.Map" parameterType="java.util.Map">
@ -440,8 +444,12 @@
INNER JOIN worker_attendance_presence p ON w1.person_sn = p.person_sn INNER JOIN worker_attendance_presence p ON w1.person_sn = p.person_sn
Left JOIN team_info g ON (w1.project_sn = g.project_sn and w1.team_id = g.id) Left JOIN team_info g ON (w1.project_sn = g.project_sn and w1.team_id = g.id)
<where> <where>
<if test="supplierEnterpriseId != null and supplierEnterpriseId != ''">
AND (w1.enterprise_id = #{supplierEnterpriseId} OR w1.enterprise_id IN ( SELECT t.enterprise_id FROM
project_enterprise t WHERE find_in_set(#{projectEnterpriseId}, ancestors) ))
</if>
<if test="projectSn != null and projectSn != ''"> <if test="projectSn != null and projectSn != ''">
w1.project_sn = #{projectSn} and w1.project_sn = #{projectSn}
</if> </if>
and w1.inService_type = 1 and w1.inService_type = 1
<!--and p.create_time>=CONCAT(DATE_FORMAT(now(),"%Y-%m-%d"),' 00:00:00')--> <!--and p.create_time>=CONCAT(DATE_FORMAT(now(),"%Y-%m-%d"),' 00:00:00')-->
@ -971,6 +979,10 @@
from worker_info w1 from worker_info w1
INNER JOIN worker_attendance p ON w1.person_sn = p.person_sn INNER JOIN worker_attendance p ON w1.person_sn = p.person_sn
<where> <where>
<if test="supplierEnterpriseId != null and supplierEnterpriseId != ''">
AND (w1.enterprise_id = #{supplierEnterpriseId} OR w1.enterprise_id IN ( SELECT t.enterprise_id FROM
project_enterprise t WHERE find_in_set(#{projectEnterpriseId}, ancestors) ))
</if>
<if test="projectSn != null and projectSn != ''"> <if test="projectSn != null and projectSn != ''">
and w1.project_sn = #{projectSn} and w1.project_sn = #{projectSn}
</if> </if>
@ -1002,6 +1014,10 @@
and w1.inService_type = 1 and w1.inService_type = 1
and p.create_time &lt;= CONCAT(DATE_FORMAT(DATE_ADD(NOW(), INTERVAL -1 DAY), "%Y-%m-%d"), ' 23:59:59') and p.create_time &lt;= CONCAT(DATE_FORMAT(DATE_ADD(NOW(), INTERVAL -1 DAY), "%Y-%m-%d"), ' 23:59:59')
and p.create_time >= CONCAT(DATE_FORMAT(DATE_ADD(NOW(), INTERVAL -1 DAY), "%Y-%m-%d"), ' 00:00:00') and p.create_time >= CONCAT(DATE_FORMAT(DATE_ADD(NOW(), INTERVAL -1 DAY), "%Y-%m-%d"), ' 00:00:00')
<if test="supplierEnterpriseId != null and supplierEnterpriseId != ''">
AND (w1.enterprise_id = #{supplierEnterpriseId} OR w1.enterprise_id IN ( SELECT t.enterprise_id FROM
project_enterprise t WHERE find_in_set(#{projectEnterpriseId}, ancestors) ))
</if>
<if test="userEnterpriseId != null and userEnterpriseId != ''"> <if test="userEnterpriseId != null and userEnterpriseId != ''">
and FIND_IN_SET(w1.enterprise_id, #{userEnterpriseId}) and FIND_IN_SET(w1.enterprise_id, #{userEnterpriseId})
</if> </if>

View File

@ -172,6 +172,10 @@
INNER JOIN worker_safe_education_worker w2 ON w1.id = w2.edu_id INNER JOIN worker_safe_education_worker w2 ON w1.id = w2.edu_id
INNER JOIN worker_info w3 ON w2.worker_id = w3.id INNER JOIN worker_info w3 ON w2.worker_id = w3.id
WHERE w3.inService_type = 1 WHERE w3.inService_type = 1
<if test="supplierEnterpriseId != null and supplierEnterpriseId != ''">
AND (w3.enterprise_id = #{supplierEnterpriseId} OR w3.enterprise_id IN ( SELECT t.enterprise_id FROM
project_enterprise t WHERE find_in_set(#{projectEnterpriseId}, ancestors) ))
</if>
<if test="projectSn != null and projectSn != ''"> <if test="projectSn != null and projectSn != ''">
and w3.project_sn = #{projectSn} and w3.project_sn = #{projectSn}
</if> </if>

View File

@ -44,6 +44,7 @@ import com.zhgd.xmgl.modules.worker.entity.vo.*;
import com.zhgd.xmgl.modules.worker.enums.EduTypeEnum; import com.zhgd.xmgl.modules.worker.enums.EduTypeEnum;
import com.zhgd.xmgl.modules.worker.mapper.*; import com.zhgd.xmgl.modules.worker.mapper.*;
import com.zhgd.xmgl.modules.worker.service.*; import com.zhgd.xmgl.modules.worker.service.*;
import com.zhgd.xmgl.modules.xz.service.impl.XzSupplierQualificationApplyServiceImpl;
import com.zhgd.xmgl.security.util.SecurityUtils; import com.zhgd.xmgl.security.util.SecurityUtils;
import com.zhgd.xmgl.util.*; import com.zhgd.xmgl.util.*;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
@ -77,6 +78,9 @@ import java.util.stream.Collectors;
@Slf4j @Slf4j
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public class WorkerInfoServiceImpl extends ServiceImpl<WorkerInfoMapper, WorkerInfo> implements IWorkerInfoService { public class WorkerInfoServiceImpl extends ServiceImpl<WorkerInfoMapper, WorkerInfo> implements IWorkerInfoService {
@Autowired
private XzSupplierQualificationApplyServiceImpl xzSupplierQualificationApplyService;
@Autowired @Autowired
private AsyncJiLianDa asyncJiLianDa; private AsyncJiLianDa asyncJiLianDa;
@Autowired @Autowired
@ -509,6 +513,11 @@ public class WorkerInfoServiceImpl extends ServiceImpl<WorkerInfoMapper, WorkerI
public PersonTypeAndEduStatisticsVo selectPersonTypeAndEduStatistics(Map<String, Object> map) { public PersonTypeAndEduStatisticsVo selectPersonTypeAndEduStatistics(Map<String, Object> map) {
Map<String, Object> data = new HashMap<>(); Map<String, Object> data = new HashMap<>();
Map<String, Object> personType = new HashMap<>(); Map<String, Object> personType = new HashMap<>();
if (systemUserService.isSupplier()) {
EnterpriseInfo info = xzSupplierQualificationApplyService.getSupplierInfoByUserId(SecurityUtils.getUser().getUserId());
map.put("projectEnterpriseId", info.getProjectEnterpriseId());
map.put("supplierEnterpriseId", info.getId());
}
Map<String, Object> toaltPerson = workerInfoMapper.selectWorkerPersonTypeTotal(map); Map<String, Object> toaltPerson = workerInfoMapper.selectWorkerPersonTypeTotal(map);
Map<String, Object> presencePerson = workerInfoMapper.selectPresenceWorkerPersonTypeTotal(map); Map<String, Object> presencePerson = workerInfoMapper.selectPresenceWorkerPersonTypeTotal(map);
Map<String, Object> attendancePerson = workerInfoMapper.selectAttendanceWorkerPersonTypeTotal(map); Map<String, Object> attendancePerson = workerInfoMapper.selectAttendanceWorkerPersonTypeTotal(map);
@ -524,6 +533,11 @@ public class WorkerInfoServiceImpl extends ServiceImpl<WorkerInfoMapper, WorkerI
@Override @Override
public Map<String, Object> selectWorkerPersonTypeStatistics(Map<String, Object> map) { public Map<String, Object> selectWorkerPersonTypeStatistics(Map<String, Object> map) {
if (systemUserService.isSupplier()) {
EnterpriseInfo info = xzSupplierQualificationApplyService.getSupplierInfoByUserId(SecurityUtils.getUser().getUserId());
map.put("projectEnterpriseId", info.getProjectEnterpriseId());
map.put("supplierEnterpriseId", info.getId());
}
Map<String, Object> toaltPerson = workerInfoMapper.selectWorkerPersonTypeTotal(map); Map<String, Object> toaltPerson = workerInfoMapper.selectWorkerPersonTypeTotal(map);
Map<String, Object> presencePerson = workerInfoMapper.selectPresenceWorkerPersonTypeTotal(map); Map<String, Object> presencePerson = workerInfoMapper.selectPresenceWorkerPersonTypeTotal(map);
Map<String, Object> attendancePerson = workerInfoMapper.selectAttendanceWorkerPersonTypeTotal(map); Map<String, Object> attendancePerson = workerInfoMapper.selectAttendanceWorkerPersonTypeTotal(map);

View File

@ -239,16 +239,6 @@ public class XzTaskProgressController {
return taskProgressService.exportXls(paramMap, request); return taskProgressService.exportXls(paramMap, request);
} }
@ApiOperation(value = "甘特图统计", notes = "甘特图统计", httpMethod = "POST")
@ApiImplicitParams({
@ApiImplicitParam(name = "projectSn", value = "项目sn", paramType = "body", required = true, dataType = "String"),
@ApiImplicitParam(name = "enterpriseId", value = "企业id", paramType = "body", required = true, dataType = "String"),
})
@PostMapping(value = "/countTaskProgress")
public Result<CountTaskProgressVo> countTaskProgress(@ApiIgnore @RequestBody HashMap<String, Object> paramMap) {
return Result.success(taskProgressService.countTaskProgress(paramMap));
}
@ApiOperation(value = "状态统计", notes = "状态统计", httpMethod = "POST") @ApiOperation(value = "状态统计", notes = "状态统计", httpMethod = "POST")
@ApiImplicitParams({ @ApiImplicitParams({
@ApiImplicitParam(name = "projectSn", value = "项目sn", paramType = "body", required = true, dataType = "String"), @ApiImplicitParam(name = "projectSn", value = "项目sn", paramType = "body", required = true, dataType = "String"),
@ -264,4 +254,14 @@ public class XzTaskProgressController {
taskProgressService.updateById(taskProgress); taskProgressService.updateById(taskProgress);
return Result.ok(); return Result.ok();
} }
@ApiOperation(value = "甘特图统计", notes = "甘特图统计", httpMethod = "POST")
@ApiImplicitParams({
@ApiImplicitParam(name = "projectSn", value = "项目sn", paramType = "body", required = true, dataType = "String"),
@ApiImplicitParam(name = "enterpriseId", value = "企业id", paramType = "body", required = true, dataType = "String"),
})
@PostMapping(value = "/countTaskProgress")
public Result<CountTaskProgressVo> countTaskProgress(@ApiIgnore @RequestBody HashMap<String, Object> paramMap) {
return Result.success(taskProgressService.countTaskProgress(paramMap));
}
} }

View File

@ -153,10 +153,23 @@
</select> </select>
<select id="getMaxMinProgress" resultType="com.zhgd.xmgl.modules.xz.entity.vo.CountTaskProgressVo"> <select id="getMaxMinProgress" resultType="com.zhgd.xmgl.modules.xz.entity.vo.CountTaskProgressVo">
select * select ifnull(DATEDIFF(max(p.finish_date), min(p.start_date)),0) projectTotalDayNum,
ifnull(if(max(p.finish_date)>now(),DATEDIFF(max(p.finish_date), now()),0),0) projectSurplusDayNum
from xz_task_progress p from xz_task_progress p
join quality_region qr on qr.id = p.quality_region_id join quality_region qr on qr.id = p.quality_region_id
join project_enterprise pe on pe.enterprise_id = p.enterprise_id join project_enterprise pe on pe.enterprise_id = p.enterprise_id
where 1 = 1 where pe.project_sn = #{projectSn}
<if test="qualityRegionId != null and qualityRegionId != ''">
AND (p.quality_region_id = #{qualityRegionId} OR p.quality_region_id IN ( SELECT t.id FROM quality_region t
WHERE find_in_set(#{qualityRegionId}, ancestors) ))
</if>
<if test="enterpriseId != null and enterpriseId != ''">
AND (p.enterprise_id = #{enterpriseId} OR p.enterprise_id IN ( SELECT t.id FROM project_enterprise t WHERE
find_in_set(#{enterpriseId}, ancestors) ))
</if>
<if test="supplierEnterpriseId != null and supplierEnterpriseId != ''">
AND (p.enterprise_id = #{supplierEnterpriseId} OR p.enterprise_id IN ( SELECT t.id FROM project_enterprise t
WHERE find_in_set(#{supplierEnterpriseId}, ancestors) ))
</if>
</select> </select>
</mapper> </mapper>

View File

@ -172,9 +172,7 @@ public class XzSupplierQualificationApplyServiceImpl extends ServiceImpl<XzSuppl
@Transactional(rollbackFor = Exception.class, propagation = Propagation.NESTED) @Transactional(rollbackFor = Exception.class, propagation = Propagation.NESTED)
public EnterpriseInfo getSupplierInfoByUserId(Long applyUserId) { public EnterpriseInfo getSupplierInfoByUserId(Long applyUserId) {
Map<String, Object> eiMap = new HashMap<>(); EnterpriseInfo ei = enterpriseInfoMapper.getXzSupplierByUserId(applyUserId);
eiMap.put("userId", applyUserId);
EnterpriseInfo ei = enterpriseInfoMapper.getXzSupplierByUserId(eiMap);
if (ei == null) { if (ei == null) {
throw new OpenAlertException("请先填写供应商信息"); throw new OpenAlertException("请先填写供应商信息");
} }

View File

@ -89,7 +89,8 @@ public class XzSupplierServiceImpl extends ServiceImpl<EnterpriseInfoMapper, Ent
@Override @Override
public EnterpriseInfo getXzSupplierByUserId(Map<String, Object> map) { public EnterpriseInfo getXzSupplierByUserId(Map<String, Object> map) {
return enterpriseInfoMapper.getXzSupplierByUserId(map); Long userId = MapUtils.getLong(map, "userId");
return enterpriseInfoMapper.getXzSupplierByUserId(userId);
} }
@Override @Override

View File

@ -19,12 +19,15 @@ import com.zhgd.xmgl.enums.ParamEnum;
import com.zhgd.xmgl.modules.basicdata.entity.SystemUser; import com.zhgd.xmgl.modules.basicdata.entity.SystemUser;
import com.zhgd.xmgl.modules.basicdata.mapper.SystemUserMapper; import com.zhgd.xmgl.modules.basicdata.mapper.SystemUserMapper;
import com.zhgd.xmgl.modules.basicdata.service.UploadFileService; import com.zhgd.xmgl.modules.basicdata.service.UploadFileService;
import com.zhgd.xmgl.modules.basicdata.service.impl.SystemUserServiceImpl;
import com.zhgd.xmgl.modules.taskprogress.entity.TaskProgressMaterialRel; import com.zhgd.xmgl.modules.taskprogress.entity.TaskProgressMaterialRel;
import com.zhgd.xmgl.modules.taskprogress.entity.TaskProgressMaterialRelPlan; import com.zhgd.xmgl.modules.taskprogress.entity.TaskProgressMaterialRelPlan;
import com.zhgd.xmgl.modules.taskprogress.mapper.TaskProgressMapper; import com.zhgd.xmgl.modules.taskprogress.mapper.TaskProgressMapper;
import com.zhgd.xmgl.modules.taskprogress.mapper.TaskProgressMaterialRelMapper; import com.zhgd.xmgl.modules.taskprogress.mapper.TaskProgressMaterialRelMapper;
import com.zhgd.xmgl.modules.taskprogress.mapper.TaskProgressMaterialRelPlanMapper; import com.zhgd.xmgl.modules.taskprogress.mapper.TaskProgressMaterialRelPlanMapper;
import com.zhgd.xmgl.modules.taskprogress.service.ITaskProgressService; import com.zhgd.xmgl.modules.taskprogress.service.ITaskProgressService;
import com.zhgd.xmgl.modules.worker.entity.EnterpriseInfo;
import com.zhgd.xmgl.modules.worker.mapper.EnterpriseInfoMapper;
import com.zhgd.xmgl.modules.xz.entity.XzTaskProgress; import com.zhgd.xmgl.modules.xz.entity.XzTaskProgress;
import com.zhgd.xmgl.modules.xz.entity.XzTaskProgressAlarm; import com.zhgd.xmgl.modules.xz.entity.XzTaskProgressAlarm;
import com.zhgd.xmgl.modules.xz.entity.XzTaskProgressContent; import com.zhgd.xmgl.modules.xz.entity.XzTaskProgressContent;
@ -70,6 +73,12 @@ import java.util.stream.Collectors;
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
@Slf4j @Slf4j
public class XzTaskProgressServiceImpl extends ServiceImpl<XzTaskProgressMapper, XzTaskProgress> implements IXzTaskProgressService { public class XzTaskProgressServiceImpl extends ServiceImpl<XzTaskProgressMapper, XzTaskProgress> implements IXzTaskProgressService {
@Autowired
private XzSupplierQualificationApplyServiceImpl xzSupplierQualificationApplyService;
@Autowired
private EnterpriseInfoMapper enterpriseInfoMapper;
@Autowired
private SystemUserServiceImpl systemUserService;
@Value("${basePath}") @Value("${basePath}")
private String basePath; private String basePath;
@Autowired @Autowired
@ -495,11 +504,19 @@ public class XzTaskProgressServiceImpl extends ServiceImpl<XzTaskProgressMapper,
.orderByDesc(XzTaskProgressTotal::getCreateDate) .orderByDesc(XzTaskProgressTotal::getCreateDate)
.last("limit 1") .last("limit 1")
); );
CountTaskProgressVo vo = baseMapper.countTaskProgress(paramMap); CountTaskProgressVo vo = new CountTaskProgressVo();
if (xzTaskProgressTotal == null) { if (xzTaskProgressTotal != null) {
vo.setProjectTotalProgress(xzTaskProgressTotal.getChangeAfter()); vo.setProjectTotalProgress(xzTaskProgressTotal.getChangeAfter());
} else {
vo.setProjectTotalProgress(0D);
}
if (systemUserService.isSupplier()) {
EnterpriseInfo info = xzSupplierQualificationApplyService.getSupplierInfoByUserId(SecurityUtils.getUser().getUserId());
paramMap.put("supplierEnterpriseId", info.getId());
} }
CountTaskProgressVo vo1 = baseMapper.getMaxMinProgress(paramMap); CountTaskProgressVo vo1 = baseMapper.getMaxMinProgress(paramMap);
vo.setProjectTotalDayNum(vo1.getProjectTotalDayNum());
vo.setProjectSurplusDayNum(vo1.getProjectSurplusDayNum());
return vo; return vo;
} }

View File

@ -90,6 +90,7 @@ public class WebSecurityConfig extends WebSecurityConfigurerAdapter {
http.authorizeRequests() http.authorizeRequests()
//请求路径允许访问 //请求路径允许访问
.antMatchers("/xmgl/recognition/checkFace").permitAll()
.antMatchers("/xmgl/base/device/login").permitAll() .antMatchers("/xmgl/base/device/login").permitAll()
.antMatchers("/xmgl/magic/**").permitAll() .antMatchers("/xmgl/magic/**").permitAll()
.antMatchers("/xmgl/magic/web/**").permitAll() .antMatchers("/xmgl/magic/web/**").permitAll()