Commit 824c86a4 authored by 韩桐桐's avatar 韩桐桐

fix(jg):工业管道历史使用等级作废调整

parent c0b8c18b
......@@ -80,6 +80,7 @@
ur.supervision_org_code,
ur.use_address as fullAddress,
ur.cancel_reason as cancelReason,
ur.project_contraption_id as projectContraptionId,
(select group_concat(re.equ_id) from tzs_jg_use_registration_eq re where ur.sequence_nbr = re.equip_transfer_id) as equipId,
(SELECT
group_concat(DISTINCT other.supervisory_code)
......
......@@ -10,6 +10,7 @@ import com.yeejoin.amos.boot.module.jg.api.entity.JgUseRegistration;
import com.yeejoin.amos.boot.module.jg.api.enums.CompanyTypeEnum;
import com.yeejoin.amos.boot.module.jg.biz.service.impl.JgUseRegistrationServiceImpl;
import com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgProjectContraption;
import com.yeejoin.amos.boot.module.ymt.api.mapper.IdxBizJgProjectContraptionMapper;
import com.yeejoin.amos.component.feign.model.FeignClientResult;
import com.yeejoin.amos.component.feign.utils.FeignUtil;
import com.yeejoin.amos.feign.privilege.Privilege;
......@@ -29,6 +30,7 @@ import org.typroject.tyboot.core.restful.utils.ResponseHelper;
import org.typroject.tyboot.core.restful.utils.ResponseModel;
import springfox.documentation.annotations.ApiIgnore;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse;
import java.text.ParseException;
import java.text.SimpleDateFormat;
......@@ -45,6 +47,8 @@ public class JgUseRegistrationController extends BaseController {
@Autowired
JgUseRegistrationServiceImpl jgUseRegistrationServiceImpl;
@Resource
private IdxBizJgProjectContraptionMapper jgProjectContraptionMapper;
@TycloudOperation(ApiLevel = UserType.AGENCY)
......@@ -143,6 +147,9 @@ public class JgUseRegistrationController extends BaseController {
list.getRecords().forEach(x -> {
x.put("companyType", info.getCompany().getCompanyType());
x.put("regType", "1".equals(x.get("regType")) ? "历史登记": "2".equals(x.get("regType")) ? "特殊历史登记": "新增登记");
if ("8000".equals(String.valueOf(x.get("equListCode")))){
x.put("canVoided", jgProjectContraptionMapper.countContraptionInUseTimesForDeleteByIntoManagement(Long.parseLong((String) x.get("projectContraptionId"))) == 0);
}
});
return ResponseHelper.buildResponse(list);
}
......
......@@ -1795,6 +1795,8 @@ public class DataDockServiceImpl {
.setCreateDate(new Date())
.setCreateUserId(paramsDto.getExecUserId())
.setCreateUserName(paramsDto.getExecUserName())
.setProjectContraptionId(String.valueOf(proCon.getSequenceNbr()))
.setProjectContraption(paramsDto.getProjectContraption())
.setRegDate(new Date());
useReg.setSequenceNbr(useRegseq);
jgUseRegistrationServiceImpl.save(useReg);
......
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