包头bug修复

This commit is contained in:
guoshengxiong 2025-01-17 21:14:51 +08:00
parent 0b4d8997b1
commit a6caa3e896
15 changed files with 100 additions and 36 deletions

View File

@ -135,7 +135,6 @@ public class DataScopeHandler implements DataPermissionHandler {
tables.put("exam_train_record", "enterprise_id");
tables.put("exam_course_record", "enterprise_id");
tables.put("xz_worker_safe_watch_alarm", "enterprise_id");
tables.put("dangerous_engineering_record", "responsibility_company_id");
tables.put("project_fine_record", "enterprise_id");
tables.put("car_info", "enterprise_id");
tables.put("enterprise_info", "id");
@ -273,7 +272,9 @@ public class DataScopeHandler implements DataPermissionHandler {
tables.put("pipeline_welding_record", new MapBuilder<String, Object>().put(DEVICE_COLUMN, "device_unit_id").put(PROJECT_COLUMN, "project_group_id").build());
tables.put("pouring_order_ledger", new MapBuilder<String, Object>().put(DEVICE_COLUMN, "device").put(PROJECT_COLUMN, "project_group_id").build());
tables.put("quality_problem", new MapBuilder<String, Object>().put(DEVICE_COLUMN, "device_id").put(PROJECT_COLUMN, "project_group_id").build());
tables.put("xz_security_quality_inspection_record\n", new MapBuilder<String, Object>().put(DEVICE_COLUMN, "device_unit_id").put(PROJECT_COLUMN, "project_group_id").build());
tables.put("xz_security_quality_inspection_record", new MapBuilder<String, Object>().put(DEVICE_COLUMN, "device_unit_id").put(PROJECT_COLUMN, "project_group_id").build());
tables.put("green_construction_scheme", new MapBuilder<String, Object>().put(DEVICE_COLUMN, "device_unit").put(PROJECT_COLUMN, "project_group").build());
tables.put("dangerous_engineering_record", new MapBuilder<String, Object>().put(DEVICE_COLUMN, "device_unit").put(PROJECT_COLUMN, "project_group").build());
return tables;
}

View File

@ -164,7 +164,7 @@ public class ConstructionPlanLedgerController {
if (CollUtil.isEmpty(list)) {
return Result.ok();
}
String foldName = "ConstructionPlanLedgerDownloadPicInfo/" + IdUtil.simpleUUID();
String foldName = "temp/" + IdUtil.simpleUUID();
File foldFile = new File(PathUtil.getBasePath() + "/" + foldName);
if (!foldFile.exists()) {
foldFile.mkdirs();

View File

@ -25,7 +25,7 @@ import org.springframework.web.bind.annotation.*;
/**
* @Title: Controller
* @Description: 绿色施工方案管理修改为危大工程清单
* @Description: 危大工程清单
* @author pds
* @date 2024-08-24
* @version V1.0
@ -33,7 +33,7 @@ import org.springframework.web.bind.annotation.*;
@RestController
@RequestMapping("/xmgl/greenConstructionScheme")
@Slf4j
@Api(tags = "绿色施工方案管理相关Api")
@Api(tags = "危大工程清单相关Api")
public class GreenConstructionSchemeController {
@Autowired
private IGreenConstructionSchemeService greenConstructionSchemeService;
@ -42,8 +42,8 @@ public class GreenConstructionSchemeController {
* 分页列表查询
* @return
*/
@OperLog(operModul = "绿色施工方案管理管理", operType = "分页查询", operDesc = "分页列表查询绿色施工方案管理信息")
@ApiOperation(value = "分页列表查询绿色施工方案管理信息", notes = "分页列表查询绿色施工方案管理信息", httpMethod="GET")
@OperLog(operModul = "危大工程清单管理", operType = "分页查询", operDesc = "分页列表查询危大工程清单信息")
@ApiOperation(value = "分页列表查询危大工程清单信息", notes = "分页列表查询危大工程清单信息", httpMethod="GET")
@ApiImplicitParams({
@ApiImplicitParam(name = "pageNo", value = "第几页", paramType = "query", required = true, dataType = "Integer"),
@ApiImplicitParam(name = "pageSize", value = "每页显示条数", paramType = "query", required = true, dataType = "Integer"),
@ -57,8 +57,8 @@ public class GreenConstructionSchemeController {
* 列表查询
* @return
*/
@OperLog(operModul = "绿色施工方案管理管理", operType = "列表查询", operDesc = "列表查询绿色施工方案管理信息")
@ApiOperation(value = "列表查询绿色施工方案管理信息", notes = "列表查询绿色施工方案管理信息", httpMethod="GET")
@OperLog(operModul = "危大工程清单管理", operType = "列表查询", operDesc = "列表查询危大工程清单信息")
@ApiOperation(value = "列表查询危大工程清单信息", notes = "列表查询危大工程清单信息", httpMethod="GET")
@GetMapping(value = "/list")
public Result<List<GreenConstructionScheme>> queryList(@ApiIgnore @RequestParam HashMap<String, Object> param) {
return Result.success(greenConstructionSchemeService.queryList(param));
@ -69,8 +69,8 @@ public class GreenConstructionSchemeController {
* @param greenConstructionScheme
* @return
*/
@OperLog(operModul = "绿色施工方案管理管理", operType = "添加", operDesc = "添加绿色施工方案管理信息")
@ApiOperation(value = "添加绿色施工方案管理信息", notes = "添加绿色施工方案管理信息" , httpMethod="POST")
@OperLog(operModul = "危大工程清单管理", operType = "添加", operDesc = "添加危大工程清单信息")
@ApiOperation(value = "添加危大工程清单信息", notes = "添加危大工程清单信息" , httpMethod="POST")
@PostMapping(value = "/add")
public Result<GreenConstructionScheme> add(@RequestBody @Validate GreenConstructionScheme greenConstructionScheme) {
greenConstructionSchemeService.add(greenConstructionScheme);
@ -82,8 +82,8 @@ public class GreenConstructionSchemeController {
* @param greenConstructionScheme
* @return
*/
@OperLog(operModul = "绿色施工方案管理管理", operType = "编辑", operDesc = "编辑绿色施工方案管理信息")
@ApiOperation(value = "编辑绿色施工方案管理信息", notes = "编辑绿色施工方案管理信息" , httpMethod="POST")
@OperLog(operModul = "危大工程清单管理", operType = "编辑", operDesc = "编辑危大工程清单信息")
@ApiOperation(value = "编辑危大工程清单信息", notes = "编辑危大工程清单信息" , httpMethod="POST")
@PostMapping(value = "/edit")
public Result<GreenConstructionScheme> edit(@RequestBody GreenConstructionScheme greenConstructionScheme) {
greenConstructionSchemeService.edit(greenConstructionScheme);
@ -94,9 +94,9 @@ public class GreenConstructionSchemeController {
* 通过id删除
* @return
*/
@OperLog(operModul = "绿色施工方案管理管理", operType = "删除", operDesc = "删除绿色施工方案管理信息")
@ApiOperation(value = "删除绿色施工方案管理信息", notes = "删除绿色施工方案管理信息" , httpMethod="POST")
@ApiImplicitParam(name = "id", value = "绿色施工方案管理ID", paramType = "body", required = true, dataType = "String", example = "{\"id\":\"1\"}")
@OperLog(operModul = "危大工程清单管理", operType = "删除", operDesc = "删除危大工程清单信息")
@ApiOperation(value = "删除危大工程清单信息", notes = "删除危大工程清单信息" , httpMethod="POST")
@ApiImplicitParam(name = "id", value = "危大工程清单ID", paramType = "body", required = true, dataType = "String", example = "{\"id\":\"1\"}")
@PostMapping(value = "/delete")
public Result<GreenConstructionScheme> delete(@ApiIgnore @RequestBody HashMap<String ,Object> map) {
greenConstructionSchemeService.delete(MapUtils.getString(map, "id"));
@ -108,9 +108,9 @@ public class GreenConstructionSchemeController {
* @param id
* @return
*/
@OperLog(operModul = "绿色施工方案管理管理", operType = "通过id查询", operDesc = "通过id查询绿色施工方案管理信息")
@ApiOperation(value = "通过id查询绿色施工方案管理信息", notes = "通过id查询绿色施工方案管理信息" , httpMethod="GET")
@ApiImplicitParam(name = "id", value = "绿色施工方案管理ID", paramType = "query", required = true, dataType = "Integer")
@OperLog(operModul = "危大工程清单管理", operType = "通过id查询", operDesc = "通过id查询危大工程清单信息")
@ApiOperation(value = "通过id查询危大工程清单信息", notes = "通过id查询危大工程清单信息" , httpMethod="GET")
@ApiImplicitParam(name = "id", value = "危大工程清单ID", paramType = "query", required = true, dataType = "Integer")
@GetMapping(value = "/queryById")
public Result<GreenConstructionScheme> queryById(@RequestParam(name="id",required=true) String id) {
return Result.success(greenConstructionSchemeService.queryById(id));

View File

@ -13,7 +13,7 @@ import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* @Description: 绿色施工方案管理
* @Description: 危大工程清单
* @author pds
* @date 2024-08-24
* @version V1.0

View File

@ -52,6 +52,7 @@ public class PlanRecordController {
@ApiImplicitParam(name = "pageNo", value = "第几页", paramType = "query", required = true, dataType = "Integer"),
@ApiImplicitParam(name = "pageSize", value = "每页显示条数", paramType = "query", required = true, dataType = "Integer"),
@ApiImplicitParam(name = "recordIds", value = "计划编制ids(多个,分割)", paramType = "query", required = false, dataType = "String"),
@ApiImplicitParam(name = "projectType", value = "1项目里程碑2装置里程碑", paramType = "query", required = false, dataType = "String"),
})
@GetMapping(value = "/page")
public Result<IPage<PlanRecord>> queryPageList(@ApiIgnore @RequestParam HashMap<String, Object> param) {
@ -175,6 +176,7 @@ public class PlanRecordController {
@ApiOperation(value = "查询项目里程碑", notes = "查询项目里程碑", httpMethod = "GET")
@ApiImplicitParams({
@ApiImplicitParam(name = "projectSn", value = "项目sn", paramType = "query", required = true, dataType = "String"),
@ApiImplicitParam(name = "childCategoryId", value = "查询子集分类码id包含自身", paramType = "query", required = true, dataType = "String"),
})
@GetMapping(value = "/getProjectMilestone")
public Result<HashMap<String, Object>> getProjectMilestone(@RequestParam HashMap<String, Object> param) {

View File

@ -8,6 +8,12 @@
,su.real_name as charger_name
from plan_record t
left join system_user su on su.user_id=t.charger_id
where 1=1
<if test="param.projectType != null and param.projectType != ''">
and t.id in (select distinct pcc.record_id from plan_choose_category pcc
join plan_work_category pwc on pcc.category_id = pwc.id
where pcc.project_sn = #{param.projectSn} and pwc.project_type = #{param.projectType})
</if>
)t
${ew.customSqlSegment}
</select>

View File

@ -6,6 +6,10 @@
select * from (
select t.*
from plan_work_category t
where 1=1
<if test="param.childCategoryId != null and param.childCategoryId != ''">
and (find_in_set(#{param.childCategoryId}, t.ancestors) or t.id=#{param.childCategoryId})
</if>
)t
${ew.customSqlSegment}
</select>

View File

@ -472,6 +472,7 @@ public class PlanRecordServiceImpl extends ServiceImpl<PlanRecordMapper, PlanRec
public HashMap<String, Object> getProjectMilestone(HashMap<String, Object> param) {
HashMap<String, Object> rtMap = new HashMap<>();
String projectSn = MapUtils.getString(param, "projectSn");
Long childCategoryId = MapUtils.getLong(param, "childCategoryId");
List<PlanWorkCategory> categories = planWorkCategoryService.queryList(param);
Map<Long, List<PlanChooseCategory>> cidMap = planChooseCategoryService.queryList(param).stream().collect(Collectors.groupingBy(PlanChooseCategory::getCategoryId));
List<PlanRecord> records = planRecordService.list(new LambdaQueryWrapper<PlanRecord>().eq(PlanRecord::getProjectSn, projectSn));

View File

@ -7,45 +7,45 @@ import java.util.HashMap;
import java.util.List;
/**
* @Description: 绿色施工方案管理
* @Description: 危大工程清单
* @author pds
* @date 2024-08-24
* @version V1.0
*/
public interface IGreenConstructionSchemeService extends IService<GreenConstructionScheme> {
/**
* 分页列表查询绿色施工方案管理信息
* 分页列表查询危大工程清单信息
* @param param 参数map
* @return
*/
IPage<GreenConstructionScheme> queryPageList(HashMap<String, Object> param);
/**
* 列表查询绿色施工方案管理信息
* 列表查询危大工程清单信息
* @param param 参数map
* @return
*/
List<GreenConstructionScheme> queryList(HashMap<String, Object> param);
/**
* 添加绿色施工方案管理信息
* @param greenConstructionScheme 绿色施工方案管理
* 添加危大工程清单信息
* @param greenConstructionScheme 危大工程清单
* @return
*/
void add(GreenConstructionScheme greenConstructionScheme);
/**
* 编辑绿色施工方案管理信息
* @param greenConstructionScheme 绿色施工方案管理
* 编辑危大工程清单信息
* @param greenConstructionScheme 危大工程清单
* @return
*/
void edit(GreenConstructionScheme greenConstructionScheme);
/**
* 根据id删除绿色施工方案管理信息
* @param id 绿色施工方案管理的id
* 根据id删除危大工程清单信息
* @param id 危大工程清单的id
* @return
*/
void delete(String id);
/**
* 根据id查询绿色施工方案管理信息
* @param id 绿色施工方案管理的id
* 根据id查询危大工程清单信息
* @param id 危大工程清单的id
* @return
*/
GreenConstructionScheme queryById(String id);

View File

@ -17,7 +17,7 @@ import com.zhgd.xmgl.util.RefUtil;
import org.springframework.beans.factory.annotation.Autowired;
/**
* @Description: 绿色施工方案管理
* @Description: 危大工程清单
* @author pds
* @date 2024-08-24
* @version V1.0

View File

@ -141,6 +141,46 @@ public class DangerousEngineeringRecord implements Serializable {
@ApiModelProperty(value = "监控点编号(多个,分割)")
private String videoItemIds;
@ApiModelProperty(value="装置")
private java.lang.Long deviceUnit ;
/**
* 项目组
*/
@ApiModelProperty(value = "项目组")
private java.lang.Long projectGroup;
/**
* 监理单位
*/
@ApiModelProperty(value = "监理单位")
private java.lang.Long supervisingUnit;
/**
* EPC承包商
*/
@ApiModelProperty(value = "EPC承包商")
private java.lang.Long epcContractor;
/**
* 施工单位
*/
@ApiModelProperty(value = "施工单位")
private java.lang.Long constructionUnit;
@TableField(exist = false)
@ApiModelProperty(value = "装置名称")
private java.lang.String deviceUnitName;
@TableField(exist = false)
@ApiModelProperty(value = "项目组名称")
private java.lang.String projectGroupName;
@TableField(exist = false)
@ApiModelProperty(value = "监理单位名称")
private java.lang.String supervisingUnitName;
@TableField(exist = false)
@ApiModelProperty(value = "EPC承包商名称")
private java.lang.String epcContractorName;
@TableField(exist = false)
@ApiModelProperty(value = "施工单位名称")
private java.lang.String constructionUnitName;
@TableField(exist = false)
@ApiModelProperty(value = "类别描述列表")
private List<DangerousEngineeringChooseTypeDescribe> typeDescribeList;

View File

@ -20,7 +20,7 @@ import java.util.Map;
* @version V1.0
*/
@Mapper
//@DataScope(includeTable = "dangerous_engineering_record")
@DataScope(includeTable = "dangerous_engineering_record")
public interface DangerousEngineeringRecordMapper extends BaseMapper<DangerousEngineeringRecord> {
/**
* 分页列表查询现场危大工程信息

View File

@ -18,6 +18,11 @@
now() >= if(LENGTH(t.plan_end_time) = 10, CONCAT(DATE_FORMAT(t.plan_end_time,
'%Y-%m-%d'), ' 23:59:59'),
t.plan_end_time), 1, 0) as isOverdue
,du.device_unit_name as device_unit_name
,pg.project_group_name as project_group_name
,ei1.enterprise_name as supervising_unit_name
,ei2.enterprise_name as epc_contractor_name
,ei3.enterprise_name as construction_unit_name
from dangerous_engineering_record t
LEFT JOIN (SELECT engineering_id, COUNT(1) hidden_danger_num
from xz_security_quality_inspection_record
@ -31,6 +36,11 @@
AND `status` in (2, 3, 4)
AND type = 1
GROUP BY engineering_id) tp ON t.id = tp.engineering_id
left join device_unit du on du.id = t.device_unit
left join project_group pg on pg.id=t.project_group
left join enterprise_info ei1 on ei1.id=t.supervising_unit
left join enterprise_info ei2 on ei2.id=t.epc_contractor
left join enterprise_info ei3 on ei3.id=t.construction_unit
WHERE 1 = 1
<if test="param.constructionState != null and param.constructionState != ''">
and t.construction_state = #{param.constructionState}

View File

@ -267,7 +267,7 @@ public class MinioUtils {
}
FileInfo fileInfo = fileStorageService.of(PathUtil.getBasePath() + "/" + path)
.setPlatform(Cts.MINIO_1) //使用指定的存储平台
.setPath(savePath != null ? savePath + "/" : null)
.setPath(savePath != null ? savePath + "/" : "")
.upload();
String filename = fileInfo.getFilename();
if (StrUtil.isNotBlank(fileInfo.getPath())) {
@ -294,7 +294,7 @@ public class MinioUtils {
}
FileInfo fileInfo = fileStorageService.of(PathUtil.getBasePath() + "/" + path)
.setPlatform(Cts.MINIO_1) //使用指定的存储平台
.setPath(savePath != null ? savePath + "/" : null)
.setPath(savePath != null ? savePath + "/" : "")
.setSaveFilename(fileName)
.upload();
}

View File

@ -61,7 +61,7 @@
{{a14}}
{{b14}}
监理见证人
{{supervisingWitnessUserName}}
{{supervisingWitnessUserName}}
{{a15}}
{{b15}}
委托方电话