Commit b95ef913 authored by liufan's avatar liufan

添加:移装变更流程代码

parent 53ff7bb1
...@@ -5,7 +5,9 @@ import io.swagger.annotations.ApiModelProperty; ...@@ -5,7 +5,9 @@ import io.swagger.annotations.ApiModelProperty;
import com.yeejoin.amos.boot.biz.common.dto.BaseDto; import com.yeejoin.amos.boot.biz.common.dto.BaseDto;
import lombok.Data; import lombok.Data;
import lombok.EqualsAndHashCode; import lombok.EqualsAndHashCode;
import java.util.Date; import java.util.Date;
import java.util.List;
/** /**
* 移装变更登记登记 * 移装变更登记登记
...@@ -14,98 +16,110 @@ import java.util.Date; ...@@ -14,98 +16,110 @@ import java.util.Date;
* @date 2023-12-20 * @date 2023-12-20
*/ */
@Data @Data
@EqualsAndHashCode(callSuper = true) @EqualsAndHashCode (callSuper = true)
@ApiModel(value="JgChangeRegistrationTransferDto", description="移装变更登记登记") @ApiModel (value = "JgChangeRegistrationTransferDto", description = "移装变更登记登记")
public class JgChangeRegistrationTransferDto extends BaseDto { public class JgChangeRegistrationTransferDto extends BaseDto {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "设备监管码") @ApiModelProperty (value = "设备监管码")
private String supervisoryCode; private String supervisoryCode;
@ApiModelProperty(value = "使用单位名称") @ApiModelProperty (value = "使用单位名称")
private String useUnitName; private String useUnitName;
@ApiModelProperty(value = "申请编号") @ApiModelProperty (value = "申请编号")
private String applyNo; private String applyNo;
@ApiModelProperty(value = "办理状态") @ApiModelProperty (value = "办理状态")
private String auditStatus; private String auditStatus;
@ApiModelProperty(value = "登记机构") @ApiModelProperty (value = "登记机构")
private String receiveOrgName; private String receiveOrgName;
@ApiModelProperty(value = "检验单位") @ApiModelProperty (value = "检验单位")
private String inspectUnitName; private String inspectUnitName;
@ApiModelProperty(value = "检验结果照片") @ApiModelProperty (value = "检验结果照片")
private String inspectResultPhoto; private String inspectResultPhoto;
@ApiModelProperty(value = "检验结果") @ApiModelProperty (value = "检验结果")
private String inspectResult; private String inspectResult;
@ApiModelProperty(value = "终审通过时间") @ApiModelProperty (value = "终审通过时间")
private Date auditPassDate; private Date auditPassDate;
@ApiModelProperty(value = "登记类别") @ApiModelProperty (value = "登记类别")
private String regType; private String regType;
@ApiModelProperty(value = "注册登记日期") @ApiModelProperty (value = "注册登记日期")
private Date regDate; private Date regDate;
@ApiModelProperty(value = "注册登记人员ID") @ApiModelProperty (value = "注册登记人员ID")
private String regPersonId; private String regPersonId;
@ApiModelProperty(value = "注册登记人员") @ApiModelProperty (value = "注册登记人员")
private String regPersonName; private String regPersonName;
@ApiModelProperty(value = "安装单位名称") @ApiModelProperty (value = "安装单位名称")
private String installUnitName; private String installUnitName;
@ApiModelProperty(value = "状态") @ApiModelProperty (value = "状态")
private String status; private String status;
@ApiModelProperty(value = "备注") @ApiModelProperty (value = "备注")
private String remark; private String remark;
@ApiModelProperty(value = "创建人ID") @ApiModelProperty (value = "创建人ID")
private String createUserId; private String createUserId;
@ApiModelProperty(value = "创建时间") @ApiModelProperty (value = "创建时间")
private Date createDate; private Date createDate;
@ApiModelProperty(value = "录入单位统一信用代码") @ApiModelProperty (value = "录入单位统一信用代码")
private String inputUnitNo; private String inputUnitNo;
@ApiModelProperty(value = "使用登记编号") @ApiModelProperty (value = "使用登记编号")
private String useRegistrationCode; private String useRegistrationCode;
@ApiModelProperty(value = "流程实例id") @ApiModelProperty (value = "流程实例id")
private String instanceId; private String instanceId;
@ApiModelProperty(value = "使用单位统一信用代码") @ApiModelProperty (value = "使用单位统一信用代码")
private String useUnitCreditCode; private String useUnitCreditCode;
@ApiModelProperty(value = "检验机构统一信用代码") @ApiModelProperty (value = "检验机构统一信用代码")
private String inspectUnitCreditCode; private String inspectUnitCreditCode;
@ApiModelProperty(value = "流程执行顺序标识") @ApiModelProperty (value = "流程执行顺序标识")
private String executeSequence; private String executeSequence;
@ApiModelProperty(value = "登记机构代码") @ApiModelProperty (value = "登记机构代码")
private String receiveOrgCode; private String receiveOrgCode;
@ApiModelProperty(value = "登记机构公司代码") @ApiModelProperty (value = "登记机构公司代码")
private String receiveCompanyCode; private String receiveCompanyCode;
@ApiModelProperty(value = "下一执行节点ids") @ApiModelProperty (value = "下一执行节点ids")
private String nextExecutorIds; private String nextExecutorIds;
@ApiModelProperty(value = "移装告知申请id") @ApiModelProperty (value = "移装告知申请id")
private String reformNoticeId; private String reformNoticeId;
@ApiModelProperty(value = "任务发起人id") @ApiModelProperty (value = "任务发起人id")
private String executorUserId; private String promoter;
@ApiModelProperty (value = "设备类别")
private String equCategory;
@ApiModelProperty (value = "设备代码")
private String equCode;
@ApiModelProperty (value = "当前登录人角色Ids")
private List<String> roleIds;
private String dataType;
private String unitCode;
} }
package com.yeejoin.amos.boot.module.jg.api.entity; package com.yeejoin.amos.boot.module.jg.api.entity;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import com.yeejoin.amos.boot.biz.common.entity.BaseEntity; import com.yeejoin.amos.boot.biz.common.entity.BaseEntity;
...@@ -121,13 +122,13 @@ public class JgChangeRegistrationTransfer extends BaseEntity { ...@@ -121,13 +122,13 @@ public class JgChangeRegistrationTransfer extends BaseEntity {
/** /**
* 创建人ID * 创建人ID
*/ */
@TableField("create_user_id") @TableField(value = "create_user_id", fill = FieldFill.INSERT_UPDATE)
private String createUserId; private String createUserId;
/** /**
* 创建时间 * 创建时间
*/ */
@TableField("create_date") @TableField(value = "create_date", fill = FieldFill.INSERT_UPDATE)
private Date createDate; private Date createDate;
/** /**
...@@ -193,7 +194,7 @@ public class JgChangeRegistrationTransfer extends BaseEntity { ...@@ -193,7 +194,7 @@ public class JgChangeRegistrationTransfer extends BaseEntity {
/** /**
* 任务发起人id * 任务发起人id
*/ */
@TableField("executor_user_id") @TableField("promoter")
private String executorUserId; private String promoter;
} }
package com.yeejoin.amos.boot.module.jg.api.mapper; package com.yeejoin.amos.boot.module.jg.api.mapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.module.jg.api.dto.JgChangeRegistrationTransferDto;
import com.yeejoin.amos.boot.module.jg.api.entity.JgChangeRegistrationTransfer; import com.yeejoin.amos.boot.module.jg.api.entity.JgChangeRegistrationTransfer;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
import java.util.Map;
/** /**
* 移装变更登记登记 Mapper 接口 * 移装变更登记登记 Mapper 接口
...@@ -11,4 +17,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper; ...@@ -11,4 +17,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
*/ */
public interface JgChangeRegistrationTransferMapper extends BaseMapper<JgChangeRegistrationTransfer> { public interface JgChangeRegistrationTransferMapper extends BaseMapper<JgChangeRegistrationTransfer> {
void updatePromoter(@Param ("id")Long id);
Page<Map<String, Object>> getListPage(@Param("page")Page<Map<String, Object>> page, @Param("dto") JgChangeRegistrationTransferDto dto , @Param("roleIds") List<String> roleIds);
} }
package com.yeejoin.amos.boot.module.jg.api.service; package com.yeejoin.amos.boot.module.jg.api.service;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.yeejoin.amos.boot.module.jg.api.entity.JgChangeRegistrationTransferEq;
/** /**
* 移装变更登记设备关系表接口类 * 移装变更登记设备关系表接口类
* *
...@@ -9,4 +12,11 @@ package com.yeejoin.amos.boot.module.jg.api.service; ...@@ -9,4 +12,11 @@ package com.yeejoin.amos.boot.module.jg.api.service;
*/ */
public interface IJgChangeRegistrationTransferEqService { public interface IJgChangeRegistrationTransferEqService {
boolean saveOrUpdateTransferEqData(JgChangeRegistrationTransferEq transferEq);
JgChangeRegistrationTransferEq getDetailByEquipTransferId(String transferId);
JgChangeRegistrationTransferEq getDetailByEquIdAndTransferId(String equipId, String equipTransferId);
boolean updateDate(JgChangeRegistrationTransferEq eq, LambdaQueryWrapper<JgChangeRegistrationTransferEq> eqWapper);
} }
package com.yeejoin.amos.boot.module.jg.api.service; package com.yeejoin.amos.boot.module.jg.api.service;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yeejoin.amos.boot.biz.common.bo.ReginParams;
import com.yeejoin.amos.boot.module.jg.api.dto.JgChangeRegistrationTransferDto;
import com.yeejoin.amos.boot.module.jg.api.entity.JgChangeRegistrationTransfer;
import java.util.Map;
/** /**
* 移装变更登记登记接口类 * 移装变更登记登记接口类
* *
* @author system_generator * @author system_generator
* @date 2023-12-20 * @date 2023-12-20
*/ */
public interface IJgChangeRegistrationTransferService { public interface IJgChangeRegistrationTransferService extends IService<JgChangeRegistrationTransfer> {
boolean updateTransfer(String submitType, Map<String, Object> map, ReginParams reginParams);
boolean createTransfer(String submitType, Map<String, Object> map, ReginParams reginParams);
boolean deleteBatchBySequenceNbrs(Long[] sequenceNbrs);
Map<String, Map<String, Object>> getTransferDetail(String sequenceNbr, String equipId);
Page<Map<String, Object>> queryListForPage(Page<Map<String, Object>> page, JgChangeRegistrationTransferDto params);
void flowExecute(Long sequenceNbr, String instanceId, String operate, String comment, boolean update);
void revocation(String instanceId);
} }
package com.yeejoin.amos.boot.module.jg.api.service; package com.yeejoin.amos.boot.module.jg.api.service;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.yeejoin.amos.boot.module.jg.api.entity.JgChangeRegistrationTransfer;
import com.yeejoin.amos.boot.module.jg.api.entity.JgRegistrationHistory;
/** /**
* 接口类 * 接口类
* *
...@@ -9,4 +13,9 @@ package com.yeejoin.amos.boot.module.jg.api.service; ...@@ -9,4 +13,9 @@ package com.yeejoin.amos.boot.module.jg.api.service;
*/ */
public interface IJgRegistrationHistoryService { public interface IJgRegistrationHistoryService {
boolean saveOrUpdateHistoryData(JgRegistrationHistory history);
JgRegistrationHistory getDteailByRecord(String record, String currentDocumentId);
boolean updateDate(JgRegistrationHistory transfer, LambdaQueryWrapper<JgRegistrationHistory> historyWapper);
} }
...@@ -2,4 +2,62 @@ ...@@ -2,4 +2,62 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yeejoin.amos.boot.module.jg.api.mapper.JgChangeRegistrationTransferMapper"> <mapper namespace="com.yeejoin.amos.boot.module.jg.api.mapper.JgChangeRegistrationTransferMapper">
<update id="updatePromoter">
UPDATE tzs_jg_change_registration_reform set promoter = null
where sequence_nbr = #{id}
</update>
<select id="getListPage" resultType="java.util.Map">
select crt.sequence_nbr as sequenceNbr,
crt.audit_status as auditStatus,
crt.reg_date as regDate,
crt.use_unit_name as useUnitName,
crt.status,
crt.receive_org_name as receiveOrgName,
crt.apply_no as applyNo,
crt.next_executor_ids AS nextExecutorIds,
crt.promoter,
crt.rec_date as recDate,
crt.instance_id as instanceId,
use.USE_UNIT_NAME as useUnitName,
(SELECT name from tz_equipment_category where code = jri.EQU_CATEGORY) as equCategory,
jri.PRODUCT_NAME as productName,
jri.EQU_CODE as equCode,
use.USE_INNER_CODE as innerCode,
concat(use.PROVINCE_NAME,'-',use.CITY_NAME,'-',use.COUNTY_NAME) as allAddress,
crteq.equ_id as equipId
from tzs_jg_change_registration_transfer crt
LEFT JOIN tzs_jg_change_registration_transfer_eq crteq on crt.sequence_nbr = crteq.equip_transfer_id
LEFT JOIN idx_biz_jg_register_info jri on crteq.equ_id = jri.RECORD
LEFT JOIN idx_biz_jg_use_info use on crteq.equ_id = use.RECORD
<where>
and crt.is_delete = 0
<if test="dto.equCategory != null and dto.equCategory != ''">
and jri.EQU_CATEGORY = #{dto.equCategory}
</if>
<if test="dto.auditStatus != null and dto.auditStatus != ''">
and crt.audit_status = #{dto.auditStatus}
</if>
<if test="dto.equCode != null and dto.equCode != ''">
and jri.EQU_CODE like concat('%',#{dto.equCode},'%')
</if>
<if test="dto.useUnitName != null and dto.useUnitName != ''">
and crt.use_unit_name like concat('%',#{dto.useUnitName},'%')
</if>
<if test="roleIds != null and dto.dataType == 'jg'">
<foreach collection='roleIds' item='role' open='and (' close=')' separator='or'>
crt.execute_sequence like concat('%',#{role},'%')
</foreach>
</if>
<if test="dto.dataType == 'jg' ">
and crt.receive_company_code = #{dto.unitCode}
</if>
<if test="dto.dataType == 'company' ">
and crt.use_unit_credit_code = #{dto.unitCode}
</if>
</where>
order by crt.rec_date desc
</select>
</mapper> </mapper>
package com.yeejoin.amos.boot.module.jg.biz.controller; package com.yeejoin.amos.boot.module.jg.biz.controller;
import com.alibaba.fastjson.JSONObject;
import com.yeejoin.amos.boot.biz.common.bo.ReginParams;
import com.yeejoin.amos.boot.module.jg.api.service.IJgChangeRegistrationTransferService;
import io.swagger.annotations.ApiParam;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import com.yeejoin.amos.boot.biz.common.controller.BaseController; import com.yeejoin.amos.boot.biz.common.controller.BaseController;
import java.util.List; import java.util.List;
import java.util.Map;
import com.yeejoin.amos.boot.module.jg.biz.service.impl.JgChangeRegistrationTransferServiceImpl; import com.yeejoin.amos.boot.module.jg.biz.service.impl.JgChangeRegistrationTransferServiceImpl;
import org.typroject.tyboot.core.foundation.utils.ValidationUtil;
import org.typroject.tyboot.core.restful.exception.instance.BadRequest;
import org.typroject.tyboot.core.restful.utils.ResponseHelper; import org.typroject.tyboot.core.restful.utils.ResponseHelper;
import org.typroject.tyboot.core.restful.utils.ResponseModel; import org.typroject.tyboot.core.restful.utils.ResponseModel;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
...@@ -27,9 +35,10 @@ import org.typroject.tyboot.core.foundation.enumeration.UserType; ...@@ -27,9 +35,10 @@ import org.typroject.tyboot.core.foundation.enumeration.UserType;
@Api(tags = "移装变更登记登记Api") @Api(tags = "移装变更登记登记Api")
@RequestMapping(value = "/jg-change-registration-transfer") @RequestMapping(value = "/jg-change-registration-transfer")
public class JgChangeRegistrationTransferController extends BaseController { public class JgChangeRegistrationTransferController extends BaseController {
private static final String TABLE_PAGE_ID = "changeRegistrationTransfer";
@Autowired @Autowired
JgChangeRegistrationTransferServiceImpl jgChangeRegistrationTransferServiceImpl; IJgChangeRegistrationTransferService jgChangeRegistrationTransferService;
/** /**
* 新增移装变更登记登记 * 新增移装变更登记登记
...@@ -39,37 +48,71 @@ public class JgChangeRegistrationTransferController extends BaseController { ...@@ -39,37 +48,71 @@ public class JgChangeRegistrationTransferController extends BaseController {
@TycloudOperation(ApiLevel = UserType.AGENCY) @TycloudOperation(ApiLevel = UserType.AGENCY)
@PostMapping(value = "/save") @PostMapping(value = "/save")
@ApiOperation(httpMethod = "POST", value = "新增移装变更登记登记", notes = "新增移装变更登记登记") @ApiOperation(httpMethod = "POST", value = "新增移装变更登记登记", notes = "新增移装变更登记登记")
public ResponseModel<JgChangeRegistrationTransferDto> save(@RequestBody JgChangeRegistrationTransferDto model) { public ResponseModel<Boolean> save(@RequestParam(value = "submitType", required = false) String submitType,
model = jgChangeRegistrationTransferServiceImpl.createWithModel(model); @RequestBody Map<String, Object> map) {
return ResponseHelper.buildResponse(model); Map<String, Object> tableData = (Map<String, Object>) map.get(TABLE_PAGE_ID);
if(ValidationUtil.isEmpty(tableData)){
throw new BadRequest("参数校验失败.");
}
String equId = (String) tableData.get("record");
if(ValidationUtil.isEmpty(equId)){
throw new BadRequest("参数校验失败.");
}
ReginParams reginParams = getSelectedOrgInfo();
return ResponseHelper.buildResponse(jgChangeRegistrationTransferService.createTransfer(submitType, map, reginParams));
} }
/** /**
* 根据sequenceNbr更新 * 根据sequenceNbr更新
* *
* @param sequenceNbr 主键 * @param submitType
* @return * @return
*/ */
@TycloudOperation(ApiLevel = UserType.AGENCY) @TycloudOperation(ApiLevel = UserType.AGENCY)
@PutMapping(value = "/{sequenceNbr}") @PutMapping(value = "/update")
@ApiOperation(httpMethod = "PUT", value = "根据sequenceNbr更新移装变更登记登记", notes = "根据sequenceNbr更新移装变更登记登记") @ApiOperation(httpMethod = "PUT", value = "根据sequenceNbr更新移装变更登记登记", notes = "根据sequenceNbr更新移装变更登记登记")
public ResponseModel<JgChangeRegistrationTransferDto> updateBySequenceNbrJgChangeRegistrationTransfer(@RequestBody JgChangeRegistrationTransferDto model,@PathVariable(value = "sequenceNbr") Long sequenceNbr) { public ResponseModel<Boolean> updateBySequenceNbr(@RequestParam(value = "submitType", required = false) String submitType,
model.setSequenceNbr(sequenceNbr); @RequestBody Map<String, Object> map) {
return ResponseHelper.buildResponse(jgChangeRegistrationTransferServiceImpl.updateWithModel(model)); Map<String, Object> tableData = (Map<String, Object>) map.get(TABLE_PAGE_ID);
if(ValidationUtil.isEmpty(tableData)){
throw new BadRequest("参数校验失败.");
}
String equId = (String) tableData.get("sequenceNbr");
if(ValidationUtil.isEmpty(equId)){
throw new BadRequest("参数校验失败.");
}
ReginParams reginParams = getSelectedOrgInfo();
return ResponseHelper.buildResponse(jgChangeRegistrationTransferService.updateTransfer(submitType, map, reginParams));
}
@TycloudOperation(ApiLevel = UserType.AGENCY)
@PostMapping(value = "/flowExecute")
@ApiOperation(httpMethod = "POST", value = "执行流程", notes = "执行流程")
public ResponseModel<Object> flowExecute(@RequestBody JSONObject map) {
jgChangeRegistrationTransferService.flowExecute(Long.valueOf(String.valueOf(map.get("sequenceNbr"))),String.valueOf(map.get("instanceId")), String.valueOf(map.get("operate")), String.valueOf(map.get("opinion")), true);
return ResponseHelper.buildResponse("ok");
}
@TycloudOperation(ApiLevel = UserType.AGENCY)
@PostMapping(value = "/revocation")
@ApiOperation(httpMethod = "POST", value = "撤回", notes = "撤回")
public ResponseModel<Object> revocation(@RequestBody JSONObject map) {
jgChangeRegistrationTransferService.revocation(String.valueOf(map.get("instanceId")));
return ResponseHelper.buildResponse("ok");
} }
/** /**
* 根据sequenceNbr删除 * 根据sequenceNbrs批量删除
* *
* @param sequenceNbr 主键 * @param sequenceNbrs 主键
* @return * @return
*/ */
@TycloudOperation(ApiLevel = UserType.AGENCY) @TycloudOperation(ApiLevel = UserType.AGENCY)
@DeleteMapping(value = "/{sequenceNbr}") @DeleteMapping(value = "/deteteBatch")
@ApiOperation(httpMethod = "DELETE", value = "根据sequenceNbr删除移装变更登记登记", notes = "根据sequenceNbr删除移装变更登记登记") @ApiOperation(httpMethod = "DELETE", value = "根据sequenceNbr删除移装变更登记登记", notes = "根据sequenceNbr删除移装变更登记登记")
public ResponseModel<Boolean> deleteBySequenceNbr(HttpServletRequest request, @PathVariable(value = "sequenceNbr") Long sequenceNbr){ public ResponseModel<Boolean> deleteBySequenceNbr(HttpServletRequest request, @RequestParam(value = "sequenceNbrs") Long[] sequenceNbrs){
return ResponseHelper.buildResponse(jgChangeRegistrationTransferServiceImpl.removeById(sequenceNbr)); return ResponseHelper.buildResponse(jgChangeRegistrationTransferService.deleteBatchBySequenceNbrs(sequenceNbrs));
} }
/** /**
* 根据sequenceNbr查询 * 根据sequenceNbr查询
...@@ -78,10 +121,11 @@ public class JgChangeRegistrationTransferController extends BaseController { ...@@ -78,10 +121,11 @@ public class JgChangeRegistrationTransferController extends BaseController {
* @return * @return
*/ */
@TycloudOperation(ApiLevel = UserType.AGENCY) @TycloudOperation(ApiLevel = UserType.AGENCY)
@GetMapping(value = "/{sequenceNbr}") @GetMapping(value = "/detail")
@ApiOperation(httpMethod = "GET",value = "根据sequenceNbr查询单个移装变更登记登记", notes = "根据sequenceNbr查询单个移装变更登记登记") @ApiOperation(httpMethod = "GET",value = "根据sequenceNbr查询单个移装变更登记登记", notes = "根据sequenceNbr查询单个移装变更登记登记")
public ResponseModel<JgChangeRegistrationTransferDto> selectOne(@PathVariable Long sequenceNbr) { public ResponseModel<Map<String, Map<String, Object>>> selectOne(@RequestParam String sequenceNbr,
return ResponseHelper.buildResponse(jgChangeRegistrationTransferServiceImpl.queryBySeq(sequenceNbr)); @RequestParam String equipId) {
return ResponseHelper.buildResponse(jgChangeRegistrationTransferService.getTransferDetail(sequenceNbr, equipId));
} }
/** /**
...@@ -94,23 +138,11 @@ public class JgChangeRegistrationTransferController extends BaseController { ...@@ -94,23 +138,11 @@ public class JgChangeRegistrationTransferController extends BaseController {
@TycloudOperation(ApiLevel = UserType.AGENCY) @TycloudOperation(ApiLevel = UserType.AGENCY)
@GetMapping(value = "/page") @GetMapping(value = "/page")
@ApiOperation(httpMethod = "GET",value = "移装变更登记登记分页查询", notes = "移装变更登记登记分页查询") @ApiOperation(httpMethod = "GET",value = "移装变更登记登记分页查询", notes = "移装变更登记登记分页查询")
public ResponseModel<Page<JgChangeRegistrationTransferDto>> queryForPage(@RequestParam(value = "current") int current,@RequestParam public ResponseModel<Page<Map<String, Object>>> queryForPage(@RequestParam(value = "current") int current,
(value = "size") int size) { @RequestParam(value = "size") int size,
Page<JgChangeRegistrationTransferDto> page = new Page<JgChangeRegistrationTransferDto>(); JgChangeRegistrationTransferDto params) {
page.setCurrent(current); Page<Map<String, Object>> page = new Page<>(current, size);
page.setSize(size); return ResponseHelper.buildResponse(jgChangeRegistrationTransferService.queryListForPage(page,params));
return ResponseHelper.buildResponse(jgChangeRegistrationTransferServiceImpl.queryForJgChangeRegistrationTransferPage(page));
} }
/**
* 列表全部数据查询
*
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "GET",value = "移装变更登记登记列表全部数据查询", notes = "移装变更登记登记列表全部数据查询")
@GetMapping(value = "/list")
public ResponseModel<List<JgChangeRegistrationTransferDto>> selectForList() {
return ResponseHelper.buildResponse(jgChangeRegistrationTransferServiceImpl.queryForJgChangeRegistrationTransferList());
}
} }
...@@ -12,5 +12,5 @@ public interface IIdxBizJgConstructionInfoService { ...@@ -12,5 +12,5 @@ public interface IIdxBizJgConstructionInfoService {
boolean saveOrUpdateData(IdxBizJgConstructionInfo constructionInfo); boolean saveOrUpdateData(IdxBizJgConstructionInfo constructionInfo);
IdxBizJgConstructionInfo getOneData(String record); IdxBizJgConstructionInfo queryNewestDetailByRecord(String record);
} }
package com.yeejoin.amos.boot.module.jg.biz.service; package com.yeejoin.amos.boot.module.jg.biz.service;
import com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgInspectionDetectionInfo; import com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgInspectionDetectionInfo;
/** /**
...@@ -13,5 +12,5 @@ public interface IIdxBizJgInspectionDetectionInfoService { ...@@ -13,5 +12,5 @@ public interface IIdxBizJgInspectionDetectionInfoService {
boolean saveOrUpdateData(IdxBizJgInspectionDetectionInfo inspectionDetectionInfo); boolean saveOrUpdateData(IdxBizJgInspectionDetectionInfo inspectionDetectionInfo);
IdxBizJgInspectionDetectionInfo getOneData(String record); IdxBizJgInspectionDetectionInfo queryNewestDetailByRecord(String record);
} }
package com.yeejoin.amos.boot.module.jg.biz.service; package com.yeejoin.amos.boot.module.jg.biz.service;
import com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgMainParts; import com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgMainParts;
import java.util.List; import java.util.List;
...@@ -15,5 +14,5 @@ public interface IIdxBizJgMainPartsService { ...@@ -15,5 +14,5 @@ public interface IIdxBizJgMainPartsService {
boolean saveOrUpdateBatchData(List<IdxBizJgMainParts> mainPartsList); boolean saveOrUpdateBatchData(List<IdxBizJgMainParts> mainPartsList);
IdxBizJgMainParts getOneData(String record); List<IdxBizJgMainParts> queryListByRecord(String record);
} }
package com.yeejoin.amos.boot.module.jg.biz.service; package com.yeejoin.amos.boot.module.jg.biz.service;
import com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgMaintenanceRecordInfo; import com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgMaintenanceRecordInfo;
/** /**
...@@ -13,5 +12,5 @@ public interface IIdxBizJgMaintenanceRecordInfoService { ...@@ -13,5 +12,5 @@ public interface IIdxBizJgMaintenanceRecordInfoService {
boolean saveOrUpdateData(IdxBizJgMaintenanceRecordInfo maintenanceRecordInfo); boolean saveOrUpdateData(IdxBizJgMaintenanceRecordInfo maintenanceRecordInfo);
IdxBizJgMaintenanceRecordInfo getOneData(String record); IdxBizJgMaintenanceRecordInfo queryNewestDetailByRecord(String record);
} }
package com.yeejoin.amos.boot.module.jg.biz.service; package com.yeejoin.amos.boot.module.jg.biz.service;
import com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgProtectionDevices; import com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgProtectionDevices;
import java.util.List; import java.util.List;
...@@ -15,5 +14,5 @@ public interface IIdxBizJgProtectionDevicesService { ...@@ -15,5 +14,5 @@ public interface IIdxBizJgProtectionDevicesService {
boolean saveOrUpdateBatchData(List<IdxBizJgProtectionDevices> protectionDevicesList); boolean saveOrUpdateBatchData(List<IdxBizJgProtectionDevices> protectionDevicesList);
IdxBizJgProtectionDevices getOneData(String record); List<IdxBizJgProtectionDevices> queryListByRecord(String record);
} }
...@@ -5,9 +5,13 @@ import com.yeejoin.amos.boot.module.jg.biz.service.IIdxBizJgConstructionInfoServ ...@@ -5,9 +5,13 @@ import com.yeejoin.amos.boot.module.jg.biz.service.IIdxBizJgConstructionInfoServ
import com.yeejoin.amos.boot.module.ymt.api.dto.IdxBizJgConstructionInfoDto; import com.yeejoin.amos.boot.module.ymt.api.dto.IdxBizJgConstructionInfoDto;
import com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgConstructionInfo; import com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgConstructionInfo;
import com.yeejoin.amos.boot.module.ymt.api.mapper.IdxBizJgConstructionInfoMapper; import com.yeejoin.amos.boot.module.ymt.api.mapper.IdxBizJgConstructionInfoMapper;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.typroject.tyboot.core.foundation.utils.ValidationUtil;
import org.typroject.tyboot.core.rdbms.service.BaseService; import org.typroject.tyboot.core.rdbms.service.BaseService;
import java.util.List;
/** /**
* 施工信息表服务实现类 * 施工信息表服务实现类
* *
...@@ -21,8 +25,15 @@ public class IdxBizJgConstructionInfoServiceImpl extends BaseService<IdxBizJgCon ...@@ -21,8 +25,15 @@ public class IdxBizJgConstructionInfoServiceImpl extends BaseService<IdxBizJgCon
return this.saveOrUpdate(constructionInfo); return this.saveOrUpdate(constructionInfo);
} }
@Override //查询最新的记录
public IdxBizJgConstructionInfo getOneData(String record) { public IdxBizJgConstructionInfo queryNewestDetailByRecord(String record) {
return this.getOne(new QueryWrapper<IdxBizJgConstructionInfo>().eq("RECORD", record)); IdxBizJgConstructionInfo result = new IdxBizJgConstructionInfo();
QueryWrapper<IdxBizJgConstructionInfo> queryWrapper = new QueryWrapper<>();
queryWrapper.lambda().eq(IdxBizJgConstructionInfo::getRecord,record).orderByDesc(IdxBizJgConstructionInfo::getUscDate);
List<IdxBizJgConstructionInfo> constructionInfoList = list(queryWrapper);
if(!ValidationUtil.isEmpty(constructionInfoList)){
BeanUtils.copyProperties(constructionInfoList.get(0),result);;
}
return result;
} }
} }
\ No newline at end of file
...@@ -5,7 +5,9 @@ import com.yeejoin.amos.boot.module.jg.biz.service.IIdxBizJgInspectionDetectionI ...@@ -5,7 +5,9 @@ import com.yeejoin.amos.boot.module.jg.biz.service.IIdxBizJgInspectionDetectionI
import com.yeejoin.amos.boot.module.ymt.api.dto.IdxBizJgInspectionDetectionInfoDto; import com.yeejoin.amos.boot.module.ymt.api.dto.IdxBizJgInspectionDetectionInfoDto;
import com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgInspectionDetectionInfo; import com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgInspectionDetectionInfo;
import com.yeejoin.amos.boot.module.ymt.api.mapper.IdxBizJgInspectionDetectionInfoMapper; import com.yeejoin.amos.boot.module.ymt.api.mapper.IdxBizJgInspectionDetectionInfoMapper;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.typroject.tyboot.core.foundation.utils.ValidationUtil;
import org.typroject.tyboot.core.rdbms.service.BaseService; import org.typroject.tyboot.core.rdbms.service.BaseService;
import java.util.List; import java.util.List;
...@@ -17,14 +19,22 @@ import java.util.List; ...@@ -17,14 +19,22 @@ import java.util.List;
* @date 2023-08-17 * @date 2023-08-17
*/ */
@Service @Service
public class IdxBizJgInspectionDetectionInfoServiceImpl extends BaseService<IdxBizJgInspectionDetectionInfoDto,IdxBizJgInspectionDetectionInfo,IdxBizJgInspectionDetectionInfoMapper> implements IIdxBizJgInspectionDetectionInfoService { public class IdxBizJgInspectionDetectionInfoServiceImpl extends BaseService<IdxBizJgInspectionDetectionInfoDto, IdxBizJgInspectionDetectionInfo, IdxBizJgInspectionDetectionInfoMapper> implements IIdxBizJgInspectionDetectionInfoService {
public boolean saveOrUpdateData(IdxBizJgInspectionDetectionInfo inspectionDetectionInfo){ public boolean saveOrUpdateData(IdxBizJgInspectionDetectionInfo inspectionDetectionInfo) {
return this.saveOrUpdate(inspectionDetectionInfo); return this.saveOrUpdate(inspectionDetectionInfo);
} }
@Override //查询最新的记录
public IdxBizJgInspectionDetectionInfo getOneData(String record) { public IdxBizJgInspectionDetectionInfo queryNewestDetailByRecord(String record) {
return this.getOne(new QueryWrapper<IdxBizJgInspectionDetectionInfo>().eq("RECORD", record)); IdxBizJgInspectionDetectionInfo result = new IdxBizJgInspectionDetectionInfo();
QueryWrapper<IdxBizJgInspectionDetectionInfo> queryWrapper = new QueryWrapper<>();
queryWrapper.lambda().eq(IdxBizJgInspectionDetectionInfo::getRecord,record).orderByDesc(IdxBizJgInspectionDetectionInfo::getInspectDate);
List<IdxBizJgInspectionDetectionInfo> inspectionDetectionInfoList = list(queryWrapper);
if (!ValidationUtil.isEmpty(inspectionDetectionInfoList)) {
BeanUtils.copyProperties(inspectionDetectionInfoList.get(0), result);
}
return result;
} }
} }
\ No newline at end of file
...@@ -23,8 +23,10 @@ public class IdxBizJgMainPartsServiceImpl extends BaseService<IdxBizJgMainPartsD ...@@ -23,8 +23,10 @@ public class IdxBizJgMainPartsServiceImpl extends BaseService<IdxBizJgMainPartsD
return this.saveOrUpdateBatch(mainPartsList); return this.saveOrUpdateBatch(mainPartsList);
} }
@Override public List<IdxBizJgMainParts> queryListByRecord(String record) {
public IdxBizJgMainParts getOneData(String record) { QueryWrapper<IdxBizJgMainParts> queryWrapper = new QueryWrapper<>();
return this.getOne(new QueryWrapper<IdxBizJgMainParts>().eq("RECORD", record)); queryWrapper.lambda().eq(IdxBizJgMainParts::getRecord,record).orderByDesc(IdxBizJgMainParts::getRecDate);
return list(queryWrapper);
} }
} }
\ No newline at end of file
...@@ -5,7 +5,9 @@ import com.yeejoin.amos.boot.module.jg.biz.service.IIdxBizJgMaintenanceRecordInf ...@@ -5,7 +5,9 @@ import com.yeejoin.amos.boot.module.jg.biz.service.IIdxBizJgMaintenanceRecordInf
import com.yeejoin.amos.boot.module.ymt.api.dto.IdxBizJgMaintenanceRecordInfoDto; import com.yeejoin.amos.boot.module.ymt.api.dto.IdxBizJgMaintenanceRecordInfoDto;
import com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgMaintenanceRecordInfo; import com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgMaintenanceRecordInfo;
import com.yeejoin.amos.boot.module.ymt.api.mapper.IdxBizJgMaintenanceRecordInfoMapper; import com.yeejoin.amos.boot.module.ymt.api.mapper.IdxBizJgMaintenanceRecordInfoMapper;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.typroject.tyboot.core.foundation.utils.ValidationUtil;
import org.typroject.tyboot.core.rdbms.service.BaseService; import org.typroject.tyboot.core.rdbms.service.BaseService;
import java.util.List; import java.util.List;
...@@ -23,9 +25,17 @@ public class IdxBizJgMaintenanceRecordInfoServiceImpl extends BaseService<IdxBiz ...@@ -23,9 +25,17 @@ public class IdxBizJgMaintenanceRecordInfoServiceImpl extends BaseService<IdxBiz
return this.saveOrUpdate(maintenanceRecordInfo); return this.saveOrUpdate(maintenanceRecordInfo);
} }
@Override //查询最新的记录
public IdxBizJgMaintenanceRecordInfo getOneData(String record) { public IdxBizJgMaintenanceRecordInfo queryNewestDetailByRecord(String record) {
return this.getOne(new QueryWrapper<IdxBizJgMaintenanceRecordInfo>().eq("RECORD", record)); IdxBizJgMaintenanceRecordInfo result = new IdxBizJgMaintenanceRecordInfo();
QueryWrapper<IdxBizJgMaintenanceRecordInfo> queryWrapper = new QueryWrapper<>();
queryWrapper.lambda().eq(IdxBizJgMaintenanceRecordInfo::getRecord,record).orderByDesc(IdxBizJgMaintenanceRecordInfo::getInformEnd);
List<IdxBizJgMaintenanceRecordInfo> maintenanceRecordInfoList = list(queryWrapper);
if(!ValidationUtil.isEmpty(maintenanceRecordInfoList)){
BeanUtils.copyProperties(maintenanceRecordInfoList.get(0),result);
}
return result;
} }
} }
\ No newline at end of file
...@@ -23,8 +23,10 @@ public class IdxBizJgProtectionDevicesServiceImpl extends BaseService<IdxBizJgPr ...@@ -23,8 +23,10 @@ public class IdxBizJgProtectionDevicesServiceImpl extends BaseService<IdxBizJgPr
return this.saveOrUpdateBatch(protectionDevicesList); return this.saveOrUpdateBatch(protectionDevicesList);
} }
@Override public List<IdxBizJgProtectionDevices> queryListByRecord(String record) {
public IdxBizJgProtectionDevices getOneData(String record) { QueryWrapper<IdxBizJgProtectionDevices> queryWrapper = new QueryWrapper<>();
return this.getOne(new QueryWrapper<IdxBizJgProtectionDevices>().eq("RECORD", record)); queryWrapper.lambda().eq(IdxBizJgProtectionDevices::getRecord,record).orderByDesc(IdxBizJgProtectionDevices::getRecDate);
return list(queryWrapper);
} }
} }
\ No newline at end of file
...@@ -12,6 +12,11 @@ import com.yeejoin.amos.boot.module.jg.api.enums.ConstructionEnum; ...@@ -12,6 +12,11 @@ import com.yeejoin.amos.boot.module.jg.api.enums.ConstructionEnum;
import com.yeejoin.amos.boot.module.jg.biz.dao.ESEquipmentCategory; import com.yeejoin.amos.boot.module.jg.biz.dao.ESEquipmentCategory;
import com.yeejoin.amos.boot.module.jg.biz.service.*; import com.yeejoin.amos.boot.module.jg.biz.service.*;
import com.yeejoin.amos.boot.module.ymt.api.dto.ESEquipmentCategoryDto; import com.yeejoin.amos.boot.module.ymt.api.dto.ESEquipmentCategoryDto;
import com.yeejoin.amos.boot.module.ymt.api.dto.IdxBizJgConstructionInfoDto;
import com.yeejoin.amos.boot.module.ymt.api.dto.IdxBizJgInspectionDetectionInfoDto;
import com.yeejoin.amos.boot.module.ymt.api.dto.IdxBizJgMainPartsDto;
import com.yeejoin.amos.boot.module.ymt.api.dto.IdxBizJgMaintenanceRecordInfoDto;
import com.yeejoin.amos.boot.module.ymt.api.dto.IdxBizJgProtectionDevicesDto;
import com.yeejoin.amos.boot.module.ymt.api.dto.IdxBizJgRegisterInfoDto; import com.yeejoin.amos.boot.module.ymt.api.dto.IdxBizJgRegisterInfoDto;
import com.yeejoin.amos.boot.module.ymt.api.entity.*; import com.yeejoin.amos.boot.module.ymt.api.entity.*;
import com.yeejoin.amos.boot.module.ymt.api.enums.EquimentEnum; import com.yeejoin.amos.boot.module.ymt.api.enums.EquimentEnum;
...@@ -25,6 +30,7 @@ import org.elasticsearch.action.search.SearchRequest; ...@@ -25,6 +30,7 @@ import org.elasticsearch.action.search.SearchRequest;
import org.elasticsearch.action.search.SearchResponse; import org.elasticsearch.action.search.SearchResponse;
import org.elasticsearch.client.RequestOptions; import org.elasticsearch.client.RequestOptions;
import org.elasticsearch.client.RestHighLevelClient; import org.elasticsearch.client.RestHighLevelClient;
import org.elasticsearch.common.recycler.Recycler;
import org.elasticsearch.index.query.BoolQueryBuilder; import org.elasticsearch.index.query.BoolQueryBuilder;
import org.elasticsearch.index.query.QueryBuilders; import org.elasticsearch.index.query.QueryBuilders;
import org.elasticsearch.search.builder.SearchSourceBuilder; import org.elasticsearch.search.builder.SearchSourceBuilder;
...@@ -271,8 +277,8 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste ...@@ -271,8 +277,8 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
objMap.putAll(factoryInfoMap); objMap.putAll(factoryInfoMap);
} }
} }
//施工信息 //施工信息 【一对多,暂时只取最新一条数据】
IdxBizJgConstructionInfo constructionInfo = iIdxBizJgConstructionInfoService.getOneData(record); IdxBizJgConstructionInfo constructionInfo = iIdxBizJgConstructionInfoService.queryNewestDetailByRecord(record);
if (!ValidationUtil.isEmpty(constructionInfo)) { if (!ValidationUtil.isEmpty(constructionInfo)) {
Map<String, Object> constructionInfoMap = null; Map<String, Object> constructionInfoMap = null;
if(!ValidationUtil.isEmpty(fieldType)){ if(!ValidationUtil.isEmpty(fieldType)){
...@@ -321,8 +327,8 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste ...@@ -321,8 +327,8 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
objMap.putAll(registerInfoMap); objMap.putAll(registerInfoMap);
} }
} }
//维保备案 //维保备案【一对多,暂时只取最新一条数据】
IdxBizJgMaintenanceRecordInfo maintenanceRecordInfo = iIdxBizJgMaintenanceRecordInfoService.getOneData(record); IdxBizJgMaintenanceRecordInfo maintenanceRecordInfo = iIdxBizJgMaintenanceRecordInfoService.queryNewestDetailByRecord(record);
if (!ValidationUtil.isEmpty(maintenanceRecordInfo)) { if (!ValidationUtil.isEmpty(maintenanceRecordInfo)) {
Map<String, Object> maintenanceRecordInfoMap = null; Map<String, Object> maintenanceRecordInfoMap = null;
if(!ValidationUtil.isEmpty(fieldType)){ if(!ValidationUtil.isEmpty(fieldType)){
...@@ -366,8 +372,8 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste ...@@ -366,8 +372,8 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
objMap.putAll(otherInfoMap); objMap.putAll(otherInfoMap);
} }
} }
//检验检测 //检验检测【一对多,暂时只取最新一条数据】
IdxBizJgInspectionDetectionInfo inspectionDetectionInfo = iIdxBizJgInspectionDetectionInfoService.getOneData(record); IdxBizJgInspectionDetectionInfo inspectionDetectionInfo = iIdxBizJgInspectionDetectionInfoService.queryNewestDetailByRecord(record);
if (!ValidationUtil.isEmpty(inspectionDetectionInfo)) { if (!ValidationUtil.isEmpty(inspectionDetectionInfo)) {
Map<String, Object> inspectionDetectionInfoMap = null; Map<String, Object> inspectionDetectionInfoMap = null;
if(!ValidationUtil.isEmpty(fieldType)){ if(!ValidationUtil.isEmpty(fieldType)){
...@@ -409,34 +415,68 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste ...@@ -409,34 +415,68 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
//压力管道 //压力管道
//起重机械 //起重机械
//主要零部件 //主要零部件【一对多,查出多条数据】
IdxBizJgMainParts mainParts = iIdxBizJgMainPartsService.getOneData(record); List<IdxBizJgMainParts> mainParts = iIdxBizJgMainPartsService.queryListByRecord(record);
if (!ValidationUtil.isEmpty(mainParts)) { if (!ValidationUtil.isEmpty(mainParts)) {
Map<String, Object> mainPartsMap = null; Map<String, Object> mainPartsResultMap = new HashMap<>();
if(!ValidationUtil.isEmpty(fieldType)){ if(!ValidationUtil.isEmpty(fieldType)){
mainPartsMap = Bean.BeantoMap(mainParts); List<Map<String, Object>> list = new ArrayList<>();
mainPartsMap.put("mainpartsSeq", mainParts.getSequenceNbr()); for(IdxBizJgMainParts mainPart : mainParts){
Map<String, Object> mainPartsMap = null;
mainPartsMap = Bean.BeantoMap(mainPart);
mainPartsMap.put("mainpartsSeq", mainPart.getSequenceNbr());
list.add(mainPartsMap);
}
if(!ValidationUtil.isEmpty(list)){
mainPartsResultMap.put("mainparts",list);
}
}else { }else {
mainPartsMap = convertCamelToUnderscore(mainParts, null); List<Map<String, Object>> list = new ArrayList<>();
mainPartsMap.put("MAINPARTS_SEQ", mainParts.getSequenceNbr()); for(IdxBizJgMainParts mainPart : mainParts){
Map<String, Object> mainPartsMap = null;
mainPartsMap = convertCamelToUnderscore(mainPart, null);
mainPartsMap.put("MAINPARTS_SEQ", mainPart.getSequenceNbr());
list.add(mainPartsMap);
}
if(!ValidationUtil.isEmpty(list)){
mainPartsResultMap.put("MAINPARTS",list);
}
} }
if(!mainPartsMap.isEmpty()) {
objMap.putAll(mainPartsMap); if(!mainPartsResultMap.isEmpty()) {
objMap.putAll(mainPartsResultMap);
} }
} }
//安全附件 //安全附件【一对多,查出多条数据】
IdxBizJgProtectionDevices protectionDevices = iIdxBizJgProtectionDevicesService.getOneData(record); List<IdxBizJgProtectionDevices> protectionDevices = iIdxBizJgProtectionDevicesService.queryListByRecord(record);
if (!ValidationUtil.isEmpty(protectionDevices)) { if (!ValidationUtil.isEmpty(protectionDevices)) {
Map<String, Object> protectionDevicesMap = null; Map<String, Object> protectionDevicesResultMap = new HashMap<>();
if(!ValidationUtil.isEmpty(fieldType)){ if(!ValidationUtil.isEmpty(fieldType)){
protectionDevicesMap = Bean.BeantoMap(protectionDevices); List<Map<String, Object>> list = new ArrayList<>();
protectionDevicesMap.put("protectiondevicesSeq", protectionDevices.getSequenceNbr()); for(IdxBizJgProtectionDevices protectionDevice : protectionDevices){
Map<String, Object> protectionDeviceMap = null;
protectionDeviceMap = Bean.BeantoMap(protectionDevice);
protectionDeviceMap.put("protectiondevicesSeq", protectionDevice.getSequenceNbr());
list.add(protectionDeviceMap);
}
if(!ValidationUtil.isEmpty(list)){
protectionDevicesResultMap.put("protectionDevices",list);
}
}else { }else {
protectionDevicesMap = convertCamelToUnderscore(protectionDevices, null); List<Map<String, Object>> list = new ArrayList<>();
protectionDevicesMap.put("PROTECTIONDEVICES_SEQ", protectionDevices.getSequenceNbr()); for(IdxBizJgProtectionDevices protectionDevice : protectionDevices){
Map<String, Object> protectionDeviceMap = null;
protectionDeviceMap = convertCamelToUnderscore(protectionDevice, null);
protectionDeviceMap.put("PROTECTIONDEVICES_SEQ", protectionDevice.getSequenceNbr());
list.add(protectionDeviceMap);
}
if(!ValidationUtil.isEmpty(list)){
protectionDevicesResultMap.put("PROTECTIONDEVICES",list);
}
} }
if(!protectionDevicesMap.isEmpty()) { if(!protectionDevicesResultMap.isEmpty()) {
objMap.putAll(protectionDevicesMap); objMap.putAll(protectionDevicesResultMap);
} }
} }
return objMap; return objMap;
......
package com.yeejoin.amos.boot.module.jg.biz.service.impl; package com.yeejoin.amos.boot.module.jg.biz.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.module.jg.api.entity.JgChangeRegistrationTransferEq; import com.yeejoin.amos.boot.module.jg.api.entity.JgChangeRegistrationTransferEq;
import com.yeejoin.amos.boot.module.jg.api.entity.JgRegistrationHistory;
import com.yeejoin.amos.boot.module.jg.api.mapper.JgChangeRegistrationTransferEqMapper; import com.yeejoin.amos.boot.module.jg.api.mapper.JgChangeRegistrationTransferEqMapper;
import com.yeejoin.amos.boot.module.jg.api.service.IJgChangeRegistrationTransferEqService; import com.yeejoin.amos.boot.module.jg.api.service.IJgChangeRegistrationTransferEqService;
import com.yeejoin.amos.boot.module.jg.api.dto.JgChangeRegistrationTransferEqDto; import com.yeejoin.amos.boot.module.jg.api.dto.JgChangeRegistrationTransferEqDto;
import org.typroject.tyboot.core.rdbms.service.BaseService; import org.typroject.tyboot.core.rdbms.service.BaseService;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import java.util.List; import java.util.List;
/** /**
...@@ -30,4 +34,26 @@ public class JgChangeRegistrationTransferEqServiceImpl extends BaseService<JgCha ...@@ -30,4 +34,26 @@ public class JgChangeRegistrationTransferEqServiceImpl extends BaseService<JgCha
public List<JgChangeRegistrationTransferEqDto> queryForJgChangeRegistrationTransferEqList() { public List<JgChangeRegistrationTransferEqDto> queryForJgChangeRegistrationTransferEqList() {
return this.queryForList("" , false); return this.queryForList("" , false);
} }
/**
* 新增移装设备关系表
* @param transferEq
*/
public boolean saveOrUpdateTransferEqData(JgChangeRegistrationTransferEq transferEq) {
return this.saveOrUpdate(transferEq);
}
public JgChangeRegistrationTransferEq getDetailByEquipTransferId(String equipTransferId) {
return this.getOne(new QueryWrapper<JgChangeRegistrationTransferEq>().eq("equip_transfer_id", equipTransferId));
}
public JgChangeRegistrationTransferEq getDetailByEquIdAndTransferId(String equipId, String equipTransferId) {
return this.getOne(new QueryWrapper<JgChangeRegistrationTransferEq>().eq("equ_id", equipId).eq("equip_transfer_id", equipTransferId));
}
public boolean updateDate(JgChangeRegistrationTransferEq eq, LambdaQueryWrapper<JgChangeRegistrationTransferEq> eqWapper) {
return this.update(eq,eqWapper);
}
} }
\ No newline at end of file
package com.yeejoin.amos.boot.module.jg.biz.service.impl; package com.yeejoin.amos.boot.module.jg.biz.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.yeejoin.amos.boot.module.jg.api.entity.JgRegistrationHistory; import com.yeejoin.amos.boot.module.jg.api.entity.JgRegistrationHistory;
import com.yeejoin.amos.boot.module.jg.api.mapper.JgRegistrationHistoryMapper; import com.yeejoin.amos.boot.module.jg.api.mapper.JgRegistrationHistoryMapper;
import com.yeejoin.amos.boot.module.jg.api.service.IJgRegistrationHistoryService; import com.yeejoin.amos.boot.module.jg.api.service.IJgRegistrationHistoryService;
...@@ -30,4 +32,32 @@ public class JgRegistrationHistoryServiceImpl extends BaseService<JgRegistration ...@@ -30,4 +32,32 @@ public class JgRegistrationHistoryServiceImpl extends BaseService<JgRegistration
public List<JgRegistrationHistoryDto> queryForJgRegistrationHistoryList() { public List<JgRegistrationHistoryDto> queryForJgRegistrationHistoryList() {
return this.queryForList("" , false); return this.queryForList("" , false);
} }
/**
* 新增或移装变更历史数据
* @param history
*/
public boolean saveOrUpdateHistoryData(JgRegistrationHistory history) {
return this.saveOrUpdate(history);
}
/**
* 根据指定参数查询历史数据详情
* @param currentDocumentId
* @return
*/
public JgRegistrationHistory getDteailByRecord(String record, String currentDocumentId) {
return this.getOne(new QueryWrapper<JgRegistrationHistory>().eq("equ_id", record).eq("current_document_id", currentDocumentId));
}
/**
* 修改历史数据
* @param history
* @param historyWapper
* @return
*/
public boolean updateDate(JgRegistrationHistory history, LambdaQueryWrapper<JgRegistrationHistory> historyWapper) {
return this.update(history, historyWapper);
}
} }
\ No newline at end of file
...@@ -221,4 +221,6 @@ public class IdxBizJgUseInfo extends TzsBaseEntity { ...@@ -221,4 +221,6 @@ public class IdxBizJgUseInfo extends TzsBaseEntity {
@TableField("\"IS_NOT_XIXIAN\"") @TableField("\"IS_NOT_XIXIAN\"")
private String isNotXiXian; private String isNotXiXian;
@TableField("\"STREET_NAME\"")
private String streetName;
} }
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