Commit 6870c05b authored by 刘林's avatar 刘林

Merge remote-tracking branch 'origin/develop_tzs_register_to_0715' into…

Merge remote-tracking branch 'origin/develop_tzs_register_to_0715' into develop_tzs_register_to_0715
parents f42a3a54 02a321d0
......@@ -455,7 +455,8 @@ public class JgUseRegistrationManageServiceImpl extends BaseService<JgUseRegistr
break;
case "exportSummaryTable":// 工业管道和气瓶 汇总表下载
List<JgUseRegistration> jgUseRegistrations = jgUseRegistrationService.getBaseMapper().selectList(new LambdaQueryWrapper<JgUseRegistration>()
.eq(JgUseRegistration::getUseRegistrationCode, useRegistrationCode));
.eq(JgUseRegistration::getUseRegistrationCode, useRegistrationCode)
.eq(JgUseRegistration::getStatus, "已完成"));
List<Long> useRegistrationSeqs = jgUseRegistrations.stream().map(JgUseRegistration::getSequenceNbr).collect(Collectors.toList());
jgUseRegistrationService.exportSummaryBasicInfo(useRegistrationSeqs, response, equCategoryCode);
break;
......
......@@ -383,19 +383,21 @@ public class JgVehicleInformationServiceImpl extends BaseService<JgVehicleInform
flowExecute(vehicleInformation.getSequenceNbr(), vehicleInformation.getInstanceId(), "0", "", String.valueOf(map.get("nextTaskId")), String.valueOf(map.get("equDefineCode")));
}
} else {
ArrayList<TaskModelDto> list = new ArrayList<>();
TaskModelDto dto = new TaskModelDto();
TaskMessageDto taskMessageDto = new TaskMessageDto();
BeanUtil.copyProperties(vehicleInformation, taskMessageDto);
taskMessageDto.setEquipId(String.valueOf(map.get("equipId")));
dto.setModel(taskMessageDto);
dto.setTaskContent("来自车用气瓶【" + vehicleInformation.getCarNumber() + "】的登记业务办理," + "【申请单号:" + vehicleInformation.getApplyNo() + "】");
dto.setTaskCode(vehicleInformation.getApplyNo());
dto.setTaskType(String.valueOf(BusinessTypeEnum.JG_VEHICLE_GAS_APPLICATION.getCode()));
dto.setRelationId(String.valueOf(vehicleInformation.getSequenceNbr()));
dto.setNextExecuteUser("");
list.add(dto);
commonService.buildTaskModel(list);
if (ObjectUtils.isEmpty(map.get("instanceId"))) {
ArrayList<TaskModelDto> list = new ArrayList<>();
TaskModelDto dto = new TaskModelDto();
TaskMessageDto taskMessageDto = new TaskMessageDto();
BeanUtil.copyProperties(vehicleInformation, taskMessageDto);
taskMessageDto.setEquipId(String.valueOf(map.get("equipId")));
dto.setModel(taskMessageDto);
dto.setTaskContent("来自车用气瓶【" + vehicleInformation.getCarNumber() + "】的登记业务办理," + "【申请单号:" + vehicleInformation.getApplyNo() + "】");
dto.setTaskCode(vehicleInformation.getApplyNo());
dto.setTaskType(String.valueOf(BusinessTypeEnum.JG_VEHICLE_GAS_APPLICATION.getCode()));
dto.setRelationId(String.valueOf(vehicleInformation.getSequenceNbr()));
dto.setNextExecuteUser("");
list.add(dto);
commonService.buildTaskModel(list);
}
}
// 设备数据存历史数据,在流程完成时使用
commonService.saveOrUpdateHistory(BusinessTypeEnum.JG_VEHICLE_GAS_APPLICATION.getName(), JSON.parseArray(JSON.toJSONString(equipmentLists)), null, vehicleInformation.getSequenceNbr() + "");
......
......@@ -180,7 +180,8 @@
tzjia.*,
tbei.supervise_org_name AS superviseOrgName,
tbei.use_unit AS applicationUnitName,
tbei.address AS address
tbei.address AS address,
(SELECT cdd.NAME from cb_data_dictionary cdd where cdd.code = tzjia.inspection_type and cdd.type = 'JYJC' limit 1) AS inspectionTypeName
FROM
tz_jyjc_inspection_application AS tzjia
LEFT JOIN tz_base_enterprise_info tbei ON tzjia.application_unit_code = tbei.use_code
......
......@@ -70,6 +70,7 @@ import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.RequestBody;
import org.typroject.tyboot.core.foundation.context.RequestContext;
import org.typroject.tyboot.core.foundation.utils.DateUtil;
import org.typroject.tyboot.core.foundation.utils.ValidationUtil;
import org.typroject.tyboot.core.rdbms.service.BaseService;
import org.typroject.tyboot.core.restful.exception.instance.BadRequest;
......@@ -600,7 +601,15 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
jsonData.forEach(f -> {
Object o = map.get(f.getKey());
if (!ObjectUtils.isEmpty(o)) {
f.setValue(o.toString());
if (f.getKey().equals("applicationDate")){
try {
f.setValue(DateUtil.formatDate((Date) o, DateUtil.Y_M_D));
} catch (Exception e) {
throw new RuntimeException(e);
}
} else {
f.setValue(o.toString());
}
}
});
......@@ -610,9 +619,9 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
data.put("label", flowLogger.get(i).get("approvalStatue"));
data.put("operatingTime", flowLogger.get(i).get("operateDate"));
if(null != flowLogger.get(i).get("assignee")) {
data.put("operater", ((Map<String, Object>) flowLogger.get(i).get("assignee")).get("orgNamesWithoutRole") + ":" + flowLogger.get(i).get("taskName"));
data.put("operater", ((Map<String, Object>) flowLogger.get(i).get("assignee")).get("orgNamesWithoutRole") + "【" + flowLogger.get(i).get("taskName") + "】");
}else if(null != flowLogger.get(i).get("companyName")){
data.put("operater", flowLogger.get(i).get("companyName") + ":" + flowLogger.get(i).get("taskName"));
data.put("operater", flowLogger.get(i).get("companyName") + "【" + flowLogger.get(i).get("taskName") + "】");
}
records.add(data);
}
......
[
{ "key": "applicationNo", "label": "报检单号" , "type": "text"},
{ "key": "applicationDate", "label": "报检日期" , "type": "text"},
{ "key": "inspectionType", "label": "检验类型" , "type": "text"},
{ "key": "inspectionTypeName", "label": "检验类型" , "type": "text"},
{ "key": "applicationUnitName", "label": "申报单位名称" , "type": "text"},
{ "key": "applicationUnitCode", "label": "单位统一信用代码" , "type": "text"},
{ "key": "address", "label": "单位地址" , "type": "text"},
......
......@@ -6,6 +6,7 @@ import com.yeejoin.amos.boot.biz.common.dto.JyjcInspectionApplicationDto;
import org.apache.ibatis.annotations.Param;
import java.util.List;
import java.util.Map;
/**
* Mapper 接口
......@@ -52,4 +53,11 @@ public interface JYJCStatisticsMapper extends BaseMapper {
* @return 按照所选区域过滤报检信息
*/
Page<JyjcInspectionApplicationDto> queryForInspectAppPageList(@Param("page") Page<JyjcInspectionApplicationDto> page, @Param("dto") JyjcInspectionApplicationDto dto, @Param("orgCode") String orgCode);
/**
* 查询资源附件
* @param applicationSeq
* @return
*/
List<Map<String,Object>> getDataByApplicationSeq(Long applicationSeq);
}
......@@ -98,6 +98,12 @@
</where>
order by tzjia.application_no desc
</select>
<select id="getDataByApplicationSeq" resultType="map">
select *
from tz_jyjc_inspection_application_attachment
where application_seq = #{applicationSeq}
</select>
</mapper>
......@@ -69,6 +69,7 @@ public class DPSubController {
} else if(template.equals("registration")) { // 登记证
Assert.notNull(param.get("sequenceNbr"), "sequenceNbr不能为空");
} else if(template.equals("inspection")) { // 报检
template = template + "_" + param.get("equListCode");
Assert.notNull(param.get("sequenceNbr"), "sequenceNbr不能为空");
} else {
throw new RuntimeException("暂无模板");
......
package com.yeejoin.amos.boot.module.statistcs.biz.controller;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.biz.common.dto.JyjcInspectionApplicationDto;
import com.yeejoin.amos.boot.module.common.api.dto.DPFilterParamDto;
......@@ -178,6 +180,12 @@ public class JYJCDPStatisticsController {
return ResponseHelper.buildResponse(statisticsService.queryForInspectAppPageList(page, model));
}
@TycloudOperation(ApiLevel = UserType.AGENCY)
@PostMapping(value = "/inspectApplication/matui/{sequenceNbr}")
@ApiOperation(httpMethod = "POST", value = "检验检测报检申请详情资源附件", notes = "检验检测报检申请详情资源附件")
public ResponseModel<JSONObject> queryDetailsMatui(@PathVariable Long sequenceNbr, @RequestBody JSONObject jsonObject) {
return ResponseHelper.buildResponse(statisticsService.queryDetailsMatui(sequenceNbr, JSONObject.parseObject(JSON.toJSONString(jsonObject))));
}
}
......
......@@ -2,11 +2,14 @@ package com.yeejoin.amos.boot.module.statistcs.biz.service.impl;
import cn.hutool.core.date.DateUtil;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.biz.common.bo.ReginParams;
import com.yeejoin.amos.boot.biz.common.dto.CountDto;
import com.yeejoin.amos.boot.biz.common.dto.JyjcInspectionApplicationDto;
import com.yeejoin.amos.boot.biz.common.utils.RedisKey;
import com.yeejoin.amos.boot.module.common.api.dto.AttachmentDto;
import com.yeejoin.amos.boot.module.common.api.dto.DPFilterParamDto;
import com.yeejoin.amos.boot.module.jyjc.api.dto.InspectTimeCountDto;
import com.yeejoin.amos.boot.module.jyjc.api.dto.InspectionTimelinesDto;
......@@ -39,6 +42,7 @@ import org.elasticsearch.search.aggregations.AggregationBuilders;
import org.elasticsearch.search.aggregations.bucket.terms.Terms;
import org.elasticsearch.search.aggregations.bucket.terms.TermsAggregationBuilder;
import org.elasticsearch.search.builder.SearchSourceBuilder;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import org.typroject.tyboot.core.foundation.context.RequestContext;
......@@ -572,4 +576,23 @@ public class JYJCDPStatisticsServiceImpl {
}
return jyjcStatisticsMapper.queryForInspectAppPageList(page, model, orgCode);
}
public JSONObject queryDetailsMatui(Long sequenceNbr, JSONObject jsonObject) {
List<Map<String, Object>> dataByApplicationSeq = jyjcStatisticsMapper.getDataByApplicationSeq(sequenceNbr);
Map<String, Object> attMap = new HashMap<>();
for (Map<String, Object> maps : dataByApplicationSeq) {
List<AttachmentDto> data = JSONArray.parseArray(maps.get("attachment_url").toString(), AttachmentDto.class);
attMap.put(maps.get("attachment_type").toString(), data);
}
JSONArray subs = jsonObject.getJSONArray("subs");
subs.stream().forEach(x -> {
JSONObject xObj = (JSONObject) x;
JSONArray datas = xObj.getJSONArray("datas");
datas.stream().forEach(y -> {
JSONObject yObj = (JSONObject) y;
yObj.put("value", !ValidationUtil.isEmpty(attMap.get(yObj.getString("key"))) ? attMap.get(yObj.getString("key")) : new JSONArray());
});
});
return jsonObject;
}
}
......@@ -41,9 +41,58 @@
{"dataRenderingMode": "actionDetailBtn","dataIndex": "action","width": 60,"align": "left","title": "操作","key": "9", "conf": { "title": "设备详情", "linkModelKey": "equip" }}
]
}
},
{
"key": "basic",
"displayName": "附件",
"renderType": "basic",
"useAloneApi": true,
"dataConfig": {
"api": {
"httpMethod":"POST",
"apiPath":"/statistics/dp/jy/inspectApplication/matui/{sequenceNbr}",
"body": {
"subs": [
{
"key": "bjmatinfo",
"displayName": "报检附件",
"renderType": "matui",
"columns": 3,
"datas": [
{ "key": "gzs", "label": "告知书(加盖受理单位公章)", "type": "file" },
{ "key": "cpzl", "label": "产品质量证明书", "type": "file" },
{ "key": "sgzxbg", "label": "施工自行检查报告", "type": "file" },
{ "key": "sght", "label": "施工合同或证明", "type": "file" },
{ "key": "sgfa", "label": "施工方案/施工设计文件", "type": "file" },
{ "key": "sgdwxk", "label": "施工单位许可证书", "type": "file" }
]
},
{
"key": "dtmatinfo",
"displayName": "电梯专项要求",
"renderType": "matui",
"columns": 3,
"datas": [
{ "key": "xssy", "label": "型式试验证书", "type": "file" },
{ "key": "xsqts", "label": "限速器和渐进式安全钳的调试证书", "type": "file" },
{ "key": "tjsm", "label": "土建声明", "type": "file" }
]
},
{
"key": "qtmatinfo",
"displayName": "其他附件",
"renderType": "matui",
"columns": 3,
"datas": [
{ "key": "qtfj", "label": "附件", "type": "file" },
]
}
]
}
}
}
}
],
"content": {
}
}
\ No newline at end of file
{
"name": "报检模板",
"tabs": [
{
"key": "keyinfo",
"displayName": "基本信息",
"renderType": "keyinfo",
"dataConfig": {
"api": {
"httpMethod":"GET",
"apiPath":"/jyjc/jyjc-inspection-application/selectOneForBigScreen/{sequenceNbr}"
}
}
},
{
"key": "devtable",
"displayName": "报检设备",
"renderType": "table",
"useAloneApi": true,
"dataConfig": {
"api": {
"httpMethod":"GET",
"apiPath":"/jyjc/jyjc-inspection-application/selectOneForBigScreenEqu/{sequenceNbr}",
"params": {
"current": 1,
"size": 10
}
}
},
"visualParams": {
"rowKey": "SEQUENCE_NBR",
"columns": [
{"dataRenderingMode": "defaultText","dataIndex": "EQU_CATEGORY","width": 200,"align": "left","title": "设备类别","key": "1"},
{"dataRenderingMode": "defaultText","dataIndex": "EQU_DEFINE","width": 180,"align": "left","title": "设备品种","key": "2"},
{"dataRenderingMode": "defaultText","dataIndex": "PRODUCT_NAME","width": 250,"align": "left","title": "设备名称","key": "3"},
{"dataRenderingMode": "defaultText","dataIndex": "PRODUCE_UNIT_NAME","width": 150,"align": "left","title": "设备出厂编号","key": "4"},
{"dataRenderingMode": "defaultText","dataIndex": "USE_INNER_CODE","width": 200,"align": "left","title": "单位内部编号","key": "5"},
{"dataRenderingMode": "defaultText","dataIndex": "ADDRESS","width": 250,"align": "left","title": "设备地址","key": "6"},
{"dataRenderingMode": "defaultText","dataIndex": "EQU_CODE","width": 220,"align": "left","title": "设备代码","key": "7"},
{"dataRenderingMode": "defaultText","dataIndex": "SUPERVISORY_CODE","width": 150,"align": "left","title": "监管码","key": "8"},
{"dataRenderingMode": "actionDetailBtn","dataIndex": "action","width": 60,"align": "left","title": "操作","key": "9", "conf": { "title": "设备详情", "linkModelKey": "equip" }}
]
}
},
{
"key": "basic",
"displayName": "附件",
"renderType": "basic",
"useAloneApi": true,
"dataConfig": {
"api": {
"httpMethod":"POST",
"apiPath":"/statistics/dp/jy/inspectApplication/matui/{sequenceNbr}",
"body": {
"subs": [
{
"key": "bjmatinfo",
"displayName": "报检附件",
"renderType": "matui",
"columns": 3,
"datas": [
{ "key": "gzs", "label": "告知书(加盖受理单位公章)", "type": "file" },
{ "key": "cpzl", "label": "产品质量证明书", "type": "file" },
{ "key": "sgzxbg", "label": "施工自行检查报告", "type": "file" },
{ "key": "sght", "label": "施工合同或证明", "type": "file" },
{ "key": "sgfa", "label": "施工方案/施工设计文件", "type": "file" },
{ "key": "sgdwxk", "label": "施工单位许可证书", "type": "file" }
]
},
{
"key": "qzqxmatinfo",
"displayName": "起重机械专项要求(改造和重大修理后)",
"renderType": "matui",
"columns": 3,
"datas": [
{ "key": "zlbz", "label": "质量保证手册和程序文件", "type": "file" },
{ "key": "sgzy", "label": "施工作业文件", "type": "file" },
{ "key": "sgry", "label": "施工人员、质量保证体系责任人、专业技术人员身份证、技术工人的身份证及资质证书", "type": "file" },
{ "key": "cpjs", "label": "产品技术文件", "type": "file" },
{ "key": "sgsj", "label": "施工设计文件", "type": "file" },
{ "key": "sgfb", "label": "施工分包方目录", "type": "file" },
{ "key": "fbspj", "label": "分包方评价资料", "type": "file" }
]
},
{
"key": "qtmatinfo",
"displayName": "其他附件",
"renderType": "matui",
"columns": 3,
"datas": [
{ "key": "qtfj", "label": "附件", "type": "file" },
]
}
]
}
}
}
}
],
"content": {
}
}
\ No newline at end of file
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