Commit 301d38af authored by 韩桐桐's avatar 韩桐桐

fix(jg):设备移交

parent 0ea52da4
package com.yeejoin.amos.boot.module.jg.api.dto;
import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.yeejoin.amos.boot.biz.common.dto.BaseDto;
......@@ -154,4 +155,7 @@ public class JgEquipTransferDto extends BaseDto {
@ApiModelProperty(value = "工作流下一节点任务id")
private String nextTaskId;
@ApiModelProperty(value = "工程装置表seq--压力管道用")
private String projectContraptionSeq;
}
......@@ -228,4 +228,10 @@ public class JgEquipTransfer extends BaseEntity {
*/
@TableField(value = "equ_list_code")
private String equListCode;
/**
* 工程装置表seq--压力管道用
*/
@TableField(value = "project_contraption_seq")
private String projectContraptionSeq;
}
......@@ -61,9 +61,11 @@
(select name from tz_equipment_category tec1 where tec1.code = ri."EQU_LIST") AS equList,
(select name from tz_equipment_category tec2 where tec2.code = ri."EQU_CATEGORY") AS equCategory,
(select name from tz_equipment_category tec3 where tec3.code = ri."EQU_DEFINE") AS equDefine
FROM
tzs_jg_equip_transfer jet
LEFT JOIN tzs_jg_equip_transfer_eq ete ON ete.equip_transfer_id = jet.sequence_nbr
FROM tzs_jg_equip_transfer jet
LEFT JOIN (SELECT *,
ROW_NUMBER() OVER (PARTITION BY equip_transfer_id ORDER BY equip_transfer_id) AS rn
FROM tzs_jg_equip_transfer_eq) ete
ON ete.equip_transfer_id = jet.sequence_nbr AND ete.rn = 1
LEFT JOIN idx_biz_jg_register_info ri ON ri.record = ete.equ_id
LEFT JOIN idx_biz_jg_design_info di ON di.record = ete.equ_id
LEFT JOIN idx_biz_jg_factory_info fi ON fi.record = ete.equ_id
......@@ -184,6 +186,7 @@
jet.instance_status AS instanceStatus,
jet.accept_date AS acceptDate,
jet.task_name AS taskName,
jet.project_contraption_seq AS projectContraptionSeq,
ri.product_name AS productName,
ri.brand_name AS brandName,
ri.equ_type AS equType,
......@@ -221,9 +224,11 @@
(select name from tz_equipment_category tec WHERE ri."EQU_CATEGORY"::text = tec.code::text) AS equDefine,
(select SUPERVISORY_CODE from idx_biz_jg_other_info oi WHERE ri.RECORD = oi.RECORD) AS supervisoryCode,
ete.equ_id AS equId
FROM
tzs_jg_equip_transfer jet
LEFT JOIN tzs_jg_equip_transfer_eq ete ON ete.equip_transfer_id = jet.sequence_nbr
FROM tzs_jg_equip_transfer jet
LEFT JOIN (SELECT *,
ROW_NUMBER() OVER (PARTITION BY equip_transfer_id ORDER BY equip_transfer_id) AS rn
FROM tzs_jg_equip_transfer_eq) ete
ON ete.equip_transfer_id = jet.sequence_nbr AND ete.rn = 1
LEFT JOIN idx_biz_jg_register_info ri ON ri.record = ete.equ_id
LEFT JOIN idx_biz_jg_design_info di ON di.record = ete.equ_id
LEFT JOIN idx_biz_jg_factory_info fi ON fi.record = ete.equ_id
......
package com.yeejoin.amos.boot.module.jg.biz.controller;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.biz.common.controller.BaseController;
import com.yeejoin.amos.boot.module.jg.api.common.BaseException;
import com.yeejoin.amos.boot.module.jg.api.dto.JgEquipTransferDto;
import com.yeejoin.amos.boot.module.jg.biz.service.impl.JgEquipTransferServiceImpl;
import com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgProjectContraption;
import com.yeejoin.amos.component.feign.utils.FeignUtil;
import com.yeejoin.amos.feign.privilege.Privilege;
import com.yeejoin.amos.feign.privilege.model.AgencyUserModel;
......@@ -145,5 +147,26 @@ public class JgEquipTransferController extends BaseController {
}
return ResponseHelper.buildResponse(map);
}
/**
* 查询有使用登记证,不在流程中的,已纳管的,装置父ID为空的数据
*
* @param useUnitCreditCode 使用单位code
* @param current 当前页
* @param size 每页数
* @return page
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@GetMapping(value = "/finishSy/proCon")
@ApiOperation(value = "查询指定使用单位下的可用装置,已纳管且使用登记证编号为空或者null", notes = "不包括流程中的")
public ResponseModel<IPage<IdxBizJgProjectContraption>> getJgProjectContraptionPage(@RequestParam String useUnitCreditCode,
@RequestParam(value = "current") int current,
@RequestParam(value = "size") int size) {
Page<IdxBizJgProjectContraption> page = new Page<>();
page.setCurrent(current);
page.setSize(size);
return ResponseHelper.buildResponse(jgEquipTransferServiceImpl.getJgProjectContraptionPage(useUnitCreditCode, page));
}
}
......@@ -1306,10 +1306,8 @@ public class CommonServiceImpl implements ICommonService {
JSONObject jsonObject = new JSONObject(noticeObj);
return jgMaintenanceContractServiceImpl.saveOrSubmit(submitType, jsonObject, reginParams);
} else if (type.equals(ApplicationFormTypeEnum.SBYJ.getBusinessCode())) {
JgEquipTransferDto jgEquipTransferDto = JSON.parseObject(JSON.toJSONString(noticeObj), JgEquipTransferDto.class);
JSONObject jsonObject = (JSONObject) JSONObject.toJSON(jgEquipTransferDto);
jsonObject.put("businessCode", type);
noticeObj.put("businessCode", type);
JSONObject jsonObject = new JSONObject(noticeObj);
return jgEquipTransferServiceImpl.saveTransfer(submitType, jsonObject, reginParams);
} else if (type.contains(ApplicationFormTypeEnum.ZX.getBusinessCode()) || type.contains(ApplicationFormTypeEnum.BF.getBusinessCode())) {
noticeObj.put("cancelType", type.equals("BF_ZX") ? "1" : "2");
......
......@@ -1166,11 +1166,11 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
.filter(x -> "8300".equals(x.getDictDataKey()))
.collect(Collectors.toList());
}
if (EquipmentClassifityEnum.YLGD.getCode().equals(equList) && "black".equals(dataSource)) {
return this.baseMapper.queryAllEquCategoriesUnderTheEquList(equList).stream()
.filter(x -> !"8300".equals(x.getDictDataKey()))
.collect(Collectors.toList());
}
// if (EquipmentClassifityEnum.YLGD.getCode().equals(equList) && "black".equals(dataSource)) {
// return this.baseMapper.queryAllEquCategoriesUnderTheEquList(equList).stream()
// .filter(x -> !"8300".equals(x.getDictDataKey()))
// .collect(Collectors.toList());
// }
}
return this.baseMapper.queryAllEquCategoriesUnderTheEquList(equList);
}
......
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