Commit 8d67a569 authored by 曹盼盼's avatar 曹盼盼

修改生成安全监察指令书编号

parent 50b27279
......@@ -28,7 +28,7 @@ public interface InspectionService {
*/
Map<String, Object> bizRecordCountByField(BizRecordCount bizRecordCount);
JSONObject getSafetySupervisionCode(String bizTable);
JSONObject getSafetySupervisionCode(String bizTable,String taskId);
JSONObject getSafetySupervisionCodeMap(String bizTable, String mapKey, String mapValue);
......
......@@ -91,8 +91,8 @@ public class InspectionController {
@GetMapping("/getSafetySupervisionCode")
@ApiOperation(value = "生成安全监察指令书编号")
@TycloudOperation(ApiLevel = UserType.AGENCY)
public ResponseModel<JSONObject> getSafetySupervisionCode(@RequestParam String bizTable) {
return ResponseHelper.buildResponse(inspectionService.getSafetySupervisionCode(bizTable));
public ResponseModel<JSONObject> getSafetySupervisionCode(@RequestParam String bizTable,@RequestParam String taskId) {
return ResponseHelper.buildResponse(inspectionService.getSafetySupervisionCode(bizTable,taskId));
}
/**
......
......@@ -139,9 +139,16 @@ public class InspectionServiceImpl implements InspectionService {
item.put("value", queryResult.get("count"));
return item;
}
/**cpp修改处*/
@Override
public JSONObject getSafetySupervisionCode(String bizTable) {
public JSONObject getSafetySupervisionCode(String bizTable,String taskId) {
JSONObject jsonObject = new JSONObject();
if (!ValidationUtil.isEmpty(taskId)) {
String sql = "select INSTRUCT_CODE from"+ bizTable+"where INSTANCE_ID=?";
String code = bizJdbcTemplate.queryForObject(sql, String.class, taskId);
jsonObject.put("code", code);
return jsonObject;
}
String safetySupervisionCode = "(%s)市监特令中[%s]第 %s 号";
AgencyUserModel agencyUserModel = Privilege.agencyUserClient.getme().getResult();
Object reginSeq = JsonValueUtils.getValueByKey(JSONObject.parse(JSON.toJSONString(agencyUserModel)), "companys", "companys.0.regionSeq");
......@@ -161,7 +168,7 @@ public class InspectionServiceImpl implements InspectionService {
Long count = bizJdbcTemplate.queryForObject(countSql, Long.class);
int year = DateUtils.getYear(DateUtils.getDateNow());
JSONObject jsonObject = new JSONObject();
jsonObject.put("code", String.format(safetySupervisionCode, region, year, count + 1));
return jsonObject;
}
......
......@@ -37,8 +37,8 @@ public class PercentOfPassDto extends BaseDto {
private Date startDate;
@ApiModelProperty(value = "项目提交日期")
private Date submitDate;
@ApiModelProperty(value = "刷新")
private String refresh;
@ApiModelProperty(value = "查看")
private String look;
......
......@@ -276,7 +276,6 @@ public class ProjectResourceController extends BaseController {
return ResponseHelper.buildResponse(materialServiceImpl.groupBySeq(sequenceNbr));
}
/**
* 根据type获取当前登录所在单位下的项目中的所有资源列表
* type:welder(焊工)、equipment(设备)、material(管材)
......
......@@ -64,6 +64,7 @@ public class InstallationQualityImpl extends BaseService<PercentOfPassDto, Quali
//分页查询项目质量监检信息
private static final String LOOK="查看";
@Override
@BusinessIdentify
@Transactional
......@@ -102,6 +103,7 @@ public class InstallationQualityImpl extends BaseService<PercentOfPassDto, Quali
percentOfPassDto.setProjectId (qualityInfo.getProjectId ( ));
percentOfPassDto.setChargePerson (qualityInfo.getProject ( ).getChargePerson ( ));
percentOfPassDto.setLook(LOOK);
//获取监理单位的id
Long supervisoryUnitId = qualityInfo.getSupervisoryUnitId ( );
//调用接口
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment