Commit 654e2518 authored by LiuLin's avatar LiuLin

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

parents 8f394f5c ac3cdfe6
package com.yeejoin.amos.boot.module.jg.api.dto;
import com.baomidou.mybatisplus.annotation.TableField;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import com.yeejoin.amos.boot.biz.common.dto.BaseDto;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.util.Date;
import java.util.List;
import java.util.Map;
/**
* 设备注销报废
......@@ -15,10 +19,10 @@ import java.util.Date;
*/
@Data
@EqualsAndHashCode(callSuper = true)
@ApiModel(value="JgScrapCancelDto", description="设备注销报废")
public class JgScrapCancelDto extends BaseDto {
@ApiModel(value = "JgScrapCancelDto", description = "设备注销报废")
public class JgScrapCancelDto extends BaseDto {
private static final long serialVersionUID = 1L;
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "注销类型(1报废注销,2移装注销)")
......@@ -63,7 +67,22 @@ public class JgScrapCancelDto extends BaseDto {
@ApiModelProperty(value = "注销证明")
private String cancelCertificate;
@ApiModelProperty(value = "注销证明文件集合格式")
private List<Map<String, Object>> cancelCertificateList;
@TableField(exist = false)
@ApiModelProperty(value = "告知设备列表")
private List<Map<String, Object>> deviceList;
@ApiModelProperty(value = "终审通过时间")
private Date auditPassDate;
private List<String> roleIds;
// 区分监管和企业
private String type;
}
......@@ -112,4 +112,8 @@ public class JgScrapCancel extends BaseEntity {
@TableField("audit_pass_date")
private Date auditPassDate;
@TableField(value = "promoter")
private String promoter;
}
package com.yeejoin.amos.boot.module.jg.api.enums;
import lombok.AllArgsConstructor;
import lombok.Getter;
/**
* 使用登记状态西悉尼
*/
@Getter
@AllArgsConstructor
public enum CancelFlowStatusEnum {
SUBMIT("使用单位提交", "submit", "使用单位待提交"),
RECEIVE("一级受理", "receive", "一级待受理"),
PRELIMINARY("二级受理", "preliminary", "二级待受理"),
REEXAMINE("三级受理", "reexamine", "三级待受理");
private final String name;
private final String code;
private final String pass;
public static CancelFlowStatusEnum getMessage(String name){
for (CancelFlowStatusEnum constants : values()) {
if (constants.getName().equals(name)) {
return constants;
}
}
return null;
}
}
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.JgScrapCancelDto;
import com.yeejoin.amos.boot.module.jg.api.dto.JgUseRegistrationDto;
import com.yeejoin.amos.boot.module.jg.api.entity.JgScrapCancel;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.MapKey;
import org.apache.ibatis.annotations.Param;
import java.util.List;
import java.util.Map;
/**
* 设备注销报废 Mapper 接口
......@@ -11,4 +19,23 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
*/
public interface JgScrapCancelMapper extends BaseMapper<JgScrapCancel> {
Page<Map<String, Object>> getListPage(@Param("page")Page<Map<String, Object>> page, @Param("dto") JgScrapCancelDto dto , @Param("roleIds") List<String> roleIds, @Param("orgCode") String orgCode);
Map<String, Object> getDetail(@Param("id")String id);
Map<String, Object> getInspectDetail(@Param("id")String id);
Map<String, Object> getUseDetail(@Param("id")String id);
Page<Map<String, Object>> getEquipListPage(@Param("page")Page<Map<String, Object>> page,@Param("factoryNum") String factoryNum,@Param("equList")String equList,@Param("equCategory")String equCategory);
void updatePromoter(@Param("id")Long id);
/**
* 根据安装告知编号查询设备、设计、制造等信息
*
* @param sequenceNbr 安装告知编号
*/
Map<String, Object> queryEquipInformation(@Param("sequenceNbr") long sequenceNbr);
}
......@@ -51,7 +51,7 @@
</if>
</where>
ORDER BY
isn.notice_date DESC
isn.rec_date DESC
</select>
<select id="queryEquipInformation" resultType="java.util.Map">
......
package com.yeejoin.amos.boot.module.jg.biz.controller;
import org.springframework.web.bind.annotation.RequestMapping;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.Api;
import org.springframework.web.bind.annotation.RestController;
import cn.hutool.core.bean.BeanUtil;
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.bo.ReginParams;
import com.yeejoin.amos.boot.biz.common.controller.BaseController;
import java.util.List;
import com.yeejoin.amos.boot.module.jg.api.dto.JgInstallationNoticeDto;
import com.yeejoin.amos.boot.module.jg.api.dto.JgScrapCancelDto;
import com.yeejoin.amos.boot.module.jg.api.dto.JgTransferNoticeDto;
import com.yeejoin.amos.boot.module.jg.api.dto.JgUseRegistrationDto;
import com.yeejoin.amos.boot.module.jg.biz.service.impl.JgScrapCancelServiceImpl;
import org.typroject.tyboot.core.restful.utils.ResponseHelper;
import org.typroject.tyboot.core.restful.utils.ResponseModel;
import com.yeejoin.amos.component.feign.utils.FeignUtil;
import com.yeejoin.amos.feign.privilege.Privilege;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import javax.servlet.http.HttpServletRequest;
import org.springframework.web.bind.annotation.*;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.module.jg.api.dto.JgScrapCancelDto;
import org.typroject.tyboot.core.restful.doc.TycloudOperation;
import org.typroject.tyboot.core.foundation.enumeration.UserType;
import org.typroject.tyboot.core.restful.doc.TycloudOperation;
import org.typroject.tyboot.core.restful.utils.ResponseHelper;
import org.typroject.tyboot.core.restful.utils.ResponseModel;
import java.util.*;
/**
* 设备注销报废
......@@ -28,89 +35,104 @@ import org.typroject.tyboot.core.foundation.enumeration.UserType;
@RequestMapping(value = "/jg-scrap-cancel")
public class JgScrapCancelController extends BaseController {
@Autowired
JgScrapCancelServiceImpl jgScrapCancelServiceImpl;
@Autowired
JgScrapCancelServiceImpl jgScrapCancelService;
/**
* 新增设备注销报废
*
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@TycloudOperation(ApiLevel = UserType.AGENCY)
@PostMapping(value = "/save")
@ApiOperation(httpMethod = "POST", value = "新增设备注销报废", notes = "新增设备注销报废")
public ResponseModel<JgScrapCancelDto> save(@RequestBody JgScrapCancelDto model) {
model = jgScrapCancelServiceImpl.createWithModel(model);
return ResponseHelper.buildResponse(model);
@ApiOperation(httpMethod = "POST", value = "新增", notes = "新增")
public ResponseModel<Object> save(@RequestParam String submitType, @RequestBody Map<String, JgScrapCancelDto> model) {
jgScrapCancelService.save(submitType, model);
return ResponseHelper.buildResponse("ok");
}
/**
* 根据sequenceNbr更新
*
* @param sequenceNbr 主键
* @return
*/
* 根据sequenceNbr更新
*
* @param model 安装告知
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@PutMapping(value = "/{sequenceNbr}")
@ApiOperation(httpMethod = "PUT", value = "根据sequenceNbr更新设备注销报废", notes = "根据sequenceNbr更新设备注销报废")
public ResponseModel<JgScrapCancelDto> updateBySequenceNbrJgScrapCancel(@RequestBody JgScrapCancelDto model,@PathVariable(value = "sequenceNbr") Long sequenceNbr) {
model.setSequenceNbr(sequenceNbr);
return ResponseHelper.buildResponse(jgScrapCancelServiceImpl.updateWithModel(model));
@PostMapping(value = "/updateInfo")
@ApiOperation(httpMethod = "POST", value = "根据sequenceNbr更新安装告知", notes = "根据sequenceNbr更新安装告知")
public ResponseModel<JgScrapCancelDto> updateInfo(@RequestParam String submitType, @RequestBody Map<String, Object> model, @RequestParam(value = "op", required = false) String op) {
JgScrapCancelDto jgScrapCancelDto = BeanUtil.mapToBean(((LinkedHashMap) model.get("jgScrapCancelAdd")), JgScrapCancelDto.class, true);
if (Objects.isNull(jgScrapCancelDto)) {
throw new IllegalArgumentException("参数jgScrapCancelAdd不能为空");
}
Object o = ((LinkedHashMap<?, ?>) model.get("jgScrapCancelAdd")).get("cancelCertificateList");
jgScrapCancelDto.setCancelCertificateList((List<Map<String, Object>>) o);
return ResponseHelper.buildResponse(jgScrapCancelService.updateInfo(submitType, jgScrapCancelDto, op));
}
/**
* 根据sequenceNbr删除
*
* @param sequenceNbr 主键
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@DeleteMapping(value = "/{sequenceNbr}")
@ApiOperation(httpMethod = "DELETE", value = "根据sequenceNbr删除设备注销报废", notes = "根据sequenceNbr删除设备注销报废")
public ResponseModel<Boolean> deleteBySequenceNbr(HttpServletRequest request, @PathVariable(value = "sequenceNbr") Long sequenceNbr){
return ResponseHelper.buildResponse(jgScrapCancelServiceImpl.removeById(sequenceNbr));
}
/**
* 根据sequenceNbr查询
*
* @param sequenceNbr 主键
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@GetMapping(value = "/{sequenceNbr}")
@ApiOperation(httpMethod = "GET",value = "根据sequenceNbr查询单个设备注销报废", notes = "根据sequenceNbr查询单个设备注销报废")
public ResponseModel<JgScrapCancelDto> selectOne(@PathVariable Long sequenceNbr) {
return ResponseHelper.buildResponse(jgScrapCancelServiceImpl.queryBySeq(sequenceNbr));
@PostMapping(value = "/flowExecute")
@ApiOperation(httpMethod = "POST", value = "执行流程", notes = "执行流程")
public ResponseModel<Object> flowExecute(@RequestBody JSONObject map) {
LinkedHashMap model1 = (LinkedHashMap)map.get("model");
LinkedHashMap jgScrapCancelInfo = (LinkedHashMap)model1.get("jgScrapCancelAdd");
JgScrapCancelDto jgScrapCancelDto = JSON.parseObject(JSON.toJSONString(jgScrapCancelInfo), JgScrapCancelDto.class);
jgScrapCancelService.flowExecute(Long.valueOf(String.valueOf(jgScrapCancelDto.getSequenceNbr())), jgScrapCancelDto.getInstanceId(), String.valueOf(map.get("operate")), String.valueOf(map.get("opinion")), true);
return ResponseHelper.buildResponse("ok");
}
@TycloudOperation(ApiLevel = UserType.AGENCY)
@PostMapping(value = "/withdraw")
@ApiOperation(httpMethod = "POST", value = "撤回", notes = "撤回")
public ResponseModel<Object> withdraw(@RequestBody JSONObject map) {
jgScrapCancelService.withdraw(String.valueOf(map.get("instanceId")));
return ResponseHelper.buildResponse("ok");
}
@TycloudOperation(ApiLevel = UserType.AGENCY)
@PostMapping(value = "/deleteBatch")
@ApiOperation(httpMethod = "POST", value = "批量删除", notes = "批量删除")
public ResponseModel<Object> deleteBatch(@RequestBody JSONObject map) {
List<Long> ids = (List<Long>) map.get("ids");
jgScrapCancelService.deleteBatch(ids);
return ResponseHelper.buildResponse("ok");
}
/**
* 列表分页查询
*
* @param current 当前页
* @param current 每页大小
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@GetMapping(value = "/page")
@ApiOperation(httpMethod = "GET",value = "设备注销报废分页查询", notes = "设备注销报废分页查询")
public ResponseModel<Page<JgScrapCancelDto>> queryForPage(@RequestParam(value = "current") int current,@RequestParam
(value = "size") int size) {
Page<JgScrapCancelDto> page = new Page<JgScrapCancelDto>();
page.setCurrent(current);
page.setSize(size);
return ResponseHelper.buildResponse(jgScrapCancelServiceImpl.queryForJgScrapCancelPage(page));
@PostMapping(value = "/deleteMessage")
@ApiOperation(httpMethod = "POST", value = "批量删除", notes = "批量删除")
public ResponseModel<Object> deleteMessage(@RequestParam("id") Long id) {
ArrayList<Long> ids = new ArrayList<>();
ids.add(id);
jgScrapCancelService.deleteBatch(ids);
return ResponseHelper.buildResponse("ok");
}
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "POST", value = "列表全部数据查询", notes = "列表全部数据查询")
@PostMapping(value = "/getList")
public ResponseModel<Page<Map<String, Object>>> getList(JgScrapCancelDto dto,
@RequestParam(value = "current") int current,
@RequestParam(value = "size") int size) {
Page<Map<String, Object>> page = new Page<>(current, size);
return ResponseHelper.buildResponse(jgScrapCancelService.getList(dto, page, dto.getRoleIds()));
}
/**
* 列表全部数据查询
*
* @return
* 根据sequenceNbr查询
*
* @param sequenceNbr 主键
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "GET",value = "设备注销报废列表全部数据查询", notes = "设备注销报废列表全部数据查询")
@GetMapping(value = "/list")
public ResponseModel<List<JgScrapCancelDto>> selectForList() {
return ResponseHelper.buildResponse(jgScrapCancelServiceImpl.queryForJgScrapCancelList());
@GetMapping(value = "/details")
@ApiOperation(httpMethod = "GET", value = "根据sequenceNbr查询单个详情", notes = "根据sequenceNbr查询单个详情")
public ResponseModel<Map<String, Object>> selectOne(@RequestParam("sequenceNbr") Long sequenceNbr) {
return ResponseHelper.buildResponse(jgScrapCancelService.queryBySequenceNbr(sequenceNbr));
}
}
......@@ -22,6 +22,7 @@ import com.yeejoin.amos.boot.module.ymt.api.entity.InspectionDetectionInfo;
import com.yeejoin.amos.boot.module.ymt.api.entity.OtherInfo;
import com.yeejoin.amos.boot.module.ymt.api.entity.UseInfo;
import com.yeejoin.amos.boot.module.ymt.api.enums.ApplicationFormTypeEnum;
import com.yeejoin.amos.boot.module.ymt.api.enums.FlowStatusEnum;
import com.yeejoin.amos.boot.module.ymt.api.mapper.*;
import com.yeejoin.amos.boot.module.ymt.api.service.ICreateCodeService;
import com.yeejoin.amos.feign.workflow.Workflow;
......@@ -64,8 +65,6 @@ public class JgChangeRegistrationReformServiceImpl extends BaseService<JgChangeR
private InspectionDetectionInfoMapper inspectionDetectionInfoMapper;
@Autowired
private OtherInfoMapper otherInfoMapper;
@Autowired
private JgChangeRegistrationReformMapper jgChangeRegistrationReformMapper;
//改造登记关系表mapper
@Autowired
private JgChangeRegistrationReformEqMapper jgChangeRegistrationReformEqMapper;
......@@ -79,7 +78,6 @@ public class JgChangeRegistrationReformServiceImpl extends BaseService<JgChangeR
//使用登记关系表mapper
@Autowired
private JgUseRegistrationEqMapper jgUseRegistrationEqMapper;
@Autowired
private IdxBizJgRegisterInfoMapper idxBizJgRegisterInfoMapper;
@Autowired
......@@ -153,7 +151,7 @@ public class JgChangeRegistrationReformServiceImpl extends BaseService<JgChangeR
List<String> applicationFormCode = iCreateCodeService.createApplicationFormCode(ApplicationFormTypeEnum.SYDJ.getCode(), 1);
jgChangeRegistrationReform.setApplyNo(applicationFormCode.get(0));
jgChangeRegistrationReform.setAuditStatus("待提交");
jgChangeRegistrationReform.setStatus(UseStatusEnum.SUBMIT.getPass());
jgChangeRegistrationReform.setStatus(FlowStatusEnum.TO_BE_SUBMITTED.getName());
this.save(jgChangeRegistrationReform);
jgChangeRegistrationReformEq.setEquipTransferId(jgChangeRegistrationReform.getSequenceNbr().toString());
jgChangeRegistrationReformEqMapper.insert(jgChangeRegistrationReformEq);
......@@ -178,7 +176,7 @@ public class JgChangeRegistrationReformServiceImpl extends BaseService<JgChangeR
// 执行流程
String status = flowExecute(jgChangeRegistrationReform.getSequenceNbr(), instanceId, "0", "", true);
jgChangeRegistrationReform.setAuditStatus("已提交");
jgChangeRegistrationReform.setStatus(UseStatusEnum.RECEIVE.getPass());
jgChangeRegistrationReform.setStatus(FlowStatusEnum.TO_BE_PROCESSED.getName());
}
jgChangeRegistrationReform.setInstanceId(instanceId);
......@@ -253,7 +251,8 @@ public class JgChangeRegistrationReformServiceImpl extends BaseService<JgChangeR
if ("流程结束".equals(taskName)) {
JgChangeRegistrationReformEq jgChangeRegistrationReformEq = jgChangeRegistrationReformEqMapper.selectOne(new QueryWrapper<JgChangeRegistrationReformEq>().eq("equip_transfer_id", jgChangeRegistrationReform.getSequenceNbr()));
jgChangeRegistrationReform.setStatus(taskName);
jgChangeRegistrationReform.setAuditStatus("已完成");
jgChangeRegistrationReform.setAuditStatus(FlowStatusEnum.TO_BE_FINISHED.getName());
//交换历史数据与新增数据
updateTechparamsByEquIdAndCurrentDoucumentId(jgChangeRegistrationReformEq.getEquId(), jgChangeRegistrationReform.getSequenceNbr().toString());
} else {
......
......@@ -657,7 +657,7 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
jgInstallationNotice.setStatus(taskName[0]);
jgInstallationNotice.setPromoter("");
jgInstallationNotice.setNextExecuteIds(String.join(",", roleList));
jgInstallationNotice.setNoticeStatus(String.valueOf(FlowStatusEnum.TO_BE_SUBMITTED.getCode()));
jgInstallationNotice.setNoticeStatus(String.valueOf(FlowStatusEnum.ROLLBACK.getCode()));
jgInstallationNoticeMapper.updateById(jgInstallationNotice);
}
}
......@@ -715,7 +715,7 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
supervisoryCodeInfo.setStatus("1");
supervisoryCodeInfoMapper.updateById(supervisoryCodeInfo);
jgInstallationNotice.setNoticeStatus(String.valueOf(FlowStatusEnum.HAVE_PROCESSED.getCode()));
jgInstallationNotice.setNoticeStatus(String.valueOf(FlowStatusEnum.TO_BE_FINISHED.getCode()));
this.generateInstallationNoticeReport(jgInstallationNotice.getSequenceNbr());
// 更新其他业务表
tzsJgOtherInfo.setCode96333(mapCode.get("code96333").toString());
......@@ -745,7 +745,7 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
}
} else {
jgInstallationNotice.setPromoter("");
jgInstallationNotice.setNoticeStatus(String.valueOf(FlowStatusEnum.TO_BE_SUBMITTED.getCode()));
jgInstallationNotice.setNoticeStatus(String.valueOf(FlowStatusEnum.REJECTED.getCode()));
}
jgInstallationNoticeMapper.updateById(jgInstallationNotice);
}
......
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