Commit 4d858f3d authored by chenzhao's avatar chenzhao

Merge remote-tracking branch 'origin/develop_tzs_register' into develop_tzs_register

parents 95364fc2 5fcf7364
...@@ -3,6 +3,7 @@ package com.yeejoin.amos.boot.module.jg.api.mapper; ...@@ -3,6 +3,7 @@ package com.yeejoin.amos.boot.module.jg.api.mapper;
import com.yeejoin.amos.boot.module.jg.api.entity.JgChangeRegistrationTransferEq; import com.yeejoin.amos.boot.module.jg.api.entity.JgChangeRegistrationTransferEq;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update; import org.apache.ibatis.annotations.Update;
/** /**
...@@ -14,4 +15,7 @@ import org.apache.ibatis.annotations.Update; ...@@ -14,4 +15,7 @@ import org.apache.ibatis.annotations.Update;
public interface JgChangeRegistrationTransferEqMapper extends BaseMapper<JgChangeRegistrationTransferEq> { public interface JgChangeRegistrationTransferEqMapper extends BaseMapper<JgChangeRegistrationTransferEq> {
@Update("update tzs_jg_change_registration_transfer_eq set is_invalid = 1 where equ_id = #{equipId} and equip_transfer_id != #{currentDocumentId} ") @Update("update tzs_jg_change_registration_transfer_eq set is_invalid = 1 where equ_id = #{equipId} and equip_transfer_id != #{currentDocumentId} ")
void updateEquipIsVaildByEquipIdAndCurrentDocumentId(@Param("equipId") String equipId,@Param("currentDocumentId") String currentDocumentId); void updateEquipIsVaildByEquipIdAndCurrentDocumentId(@Param("equipId") String equipId,@Param("currentDocumentId") String currentDocumentId);
@Select("select equ_id from tzs_jg_change_registration_transfer_eq where equip_transfer_id = #{currentDocumentId} ")
String getEquipIdByEquipTransferId(@Param("currentDocumentId") String currentDocumentId);
} }
...@@ -130,8 +130,8 @@ public class JgChangeRegistrationTransferController extends BaseController { ...@@ -130,8 +130,8 @@ public class JgChangeRegistrationTransferController extends BaseController {
@TycloudOperation(ApiLevel = UserType.AGENCY) @TycloudOperation(ApiLevel = UserType.AGENCY)
@GetMapping(value = "/detail") @GetMapping(value = "/detail")
@ApiOperation(httpMethod = "GET",value = "根据sequenceNbr查询单个移装变更登记登记", notes = "根据sequenceNbr查询单个移装变更登记登记") @ApiOperation(httpMethod = "GET",value = "根据sequenceNbr查询单个移装变更登记登记", notes = "根据sequenceNbr查询单个移装变更登记登记")
public ResponseModel<Map<String, Map<String, Object>>> selectOne(@RequestParam String sequenceNbr, public ResponseModel<Map<String, Map<String, Object>>> selectOne(@RequestParam(value = "sequenceNbr") String sequenceNbr,
@RequestParam String equipId) { @RequestParam(value = "equipId", required = false) String equipId) {
return ResponseHelper.buildResponse(jgChangeRegistrationTransferService.getTransferDetail(sequenceNbr, equipId)); return ResponseHelper.buildResponse(jgChangeRegistrationTransferService.getTransferDetail(sequenceNbr, equipId));
} }
......
...@@ -456,21 +456,14 @@ public class JgChangeRegistrationTransferServiceImpl extends BaseService<JgChang ...@@ -456,21 +456,14 @@ public class JgChangeRegistrationTransferServiceImpl extends BaseService<JgChang
} }
/** /**
* 根据设备Id查询详情 * 根据移装变更记录sequenceNbr查询详情
* *
* @param equipId 设备Id * @param sequenceNbr 变更记录sequenceNbr
* @return * @return
*/ */
public Map<String, Map<String, Object>> getTransferDetail(String sequenceNbr, String equipId) { public Map<String, Map<String, Object>> getTransferDetail(String sequenceNbr, String equipId) {
Map<String, Map<String, Object>> pageDataMap = new HashMap<>(); Map<String, Map<String, Object>> pageDataMap = new HashMap<>();
Map<String, Object> resultDataMap = new HashMap<>(); Map<String, Object> resultDataMap = new HashMap<>();
//查询设备详情
if (!ValidationUtil.isEmpty(equipId)) {
Map<String, Object> equipDetailMap = idxBizJgRegisterInfoService.getDetailFieldCamelCaseByRecord(equipId);
resultDataMap.putAll(equipDetailMap);
}
//移装变更详情 //移装变更详情
JgChangeRegistrationTransfer transferById = this.getById(sequenceNbr); JgChangeRegistrationTransfer transferById = this.getById(sequenceNbr);
if (!ValidationUtil.isEmpty(transferById)) { if (!ValidationUtil.isEmpty(transferById)) {
...@@ -478,6 +471,14 @@ public class JgChangeRegistrationTransferServiceImpl extends BaseService<JgChang ...@@ -478,6 +471,14 @@ public class JgChangeRegistrationTransferServiceImpl extends BaseService<JgChang
resultDataMap.putAll(transferToMap); resultDataMap.putAll(transferToMap);
} }
//查询设备详情
if (ValidationUtil.isEmpty(equipId)) {
equipId = jgChangeRegistrationTransferEqMapper.getEquipIdByEquipTransferId(sequenceNbr);
}
Map<String, Object> equipDetailMap = idxBizJgRegisterInfoService.getDetailFieldCamelCaseByRecord(equipId);
resultDataMap.putAll(equipDetailMap);
//判断流程是否执行完成, //判断流程是否执行完成,
// 1、未执行完成时查询历史表 // 1、未执行完成时查询历史表
// 2、执行完成后查询使用信息表 // 2、执行完成后查询使用信息表
......
...@@ -105,7 +105,7 @@ ...@@ -105,7 +105,7 @@
"type": "110", "type": "110",
"pageType": "look", "pageType": "look",
"name": "移装变更登记", "name": "移装变更登记",
"url": "/mixuap?appId=1742358052905971713&id=1737388393685348353&roleIds={roleIds}&userId={userId}&formType=look" "url": "/mixuap?appId=1742358052905971713&id=1737388393685348353&roleIds={roleIds}&userId={userId}&pageType=look"
}, },
{ {
"type": "110", "type": "110",
......
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