Commit 9657da34 authored by 王果's avatar 王果

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

parents 424715ea 9dbc5ad9
......@@ -9,6 +9,7 @@ import com.yeejoin.amos.boot.module.jg.api.dto.JgInstallationNoticeDto;
import com.yeejoin.amos.boot.module.jg.api.entity.JgInstallationNotice;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
import java.util.Map;
/**
......@@ -59,7 +60,7 @@ public interface IJgInstallationNoticeService extends IService<JgInstallationNot
* @param model 数据
* @param submitType 保存类型
*/
void saveNotice(String submitType, JSONObject model, ReginParams reginParams);
List<JgInstallationNotice> saveNotice(String submitType, JSONObject model, ReginParams reginParams);
/**
* 打印告知单
......
......@@ -8,6 +8,7 @@ import com.yeejoin.amos.boot.module.jg.api.dto.JgTransferNoticeDto;
import com.yeejoin.amos.boot.module.jg.api.entity.JgTransferNotice;
import jdk.nashorn.api.scripting.JSObject;
import java.util.List;
import java.util.Map;
/**
......@@ -26,7 +27,7 @@ public interface IJgTransferNoticeService extends IService<JgTransferNotice> {
Boolean deleteForBatch(Long[] sequenceNbrs);
void saveNotice(String submitType, Map<String, Object> model, ReginParams reginParams);
List<JgTransferNotice> saveNotice(String submitType, Map<String, Object> model, ReginParams reginParams);
String generateTransferNoticeReport(Long sequenceNbr);
......
......@@ -5,6 +5,7 @@ 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 com.yeejoin.amos.boot.module.jg.api.dto.JgUseRegistrationDto;
import com.yeejoin.amos.boot.module.jg.api.entity.JgUseRegistration;
import com.yeejoin.amos.boot.module.jg.biz.service.impl.JgUseRegistrationServiceImpl;
import com.yeejoin.amos.component.feign.utils.FeignUtil;
import com.yeejoin.amos.feign.privilege.Privilege;
......@@ -18,10 +19,7 @@ import org.typroject.tyboot.core.restful.utils.ResponseHelper;
import org.typroject.tyboot.core.restful.utils.ResponseModel;
import javax.servlet.http.HttpServletResponse;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.*;
/**
* @author system_generator
......@@ -40,8 +38,8 @@ public class JgUseRegistrationController extends BaseController {
@PostMapping(value = "/save")
@ApiOperation(httpMethod = "POST", value = "新增", notes = "新增")
public ResponseModel<Object> save(@RequestBody JSONObject map) {
jgUseRegistrationServiceImpl.save(map);
return ResponseHelper.buildResponse("ok");
JgUseRegistration data = jgUseRegistrationServiceImpl.save(map);
return ResponseHelper.buildResponse(Collections.singletonList(data));
}
@TycloudOperation(ApiLevel = UserType.AGENCY)
......
......@@ -545,7 +545,7 @@ public class CommonServiceImpl implements ICommonService {
JSONObject jsonObject1 = (JSONObject) JSONObject.toJSON(jgInstallationNoticeDto);
provideMap.put(AZGZ_FORM_ID, jsonObject1);
JSONObject jsonObject = new JSONObject(provideMap);
iJgInstallationNoticeService.saveNotice(submitType, jsonObject, reginParams);
return iJgInstallationNoticeService.saveNotice(submitType, jsonObject, reginParams);
} else if (type.equals(ApplicationFormTypeEnum.GZGZ.getBusinessCode())) {
noticeObj.put("receiveOrgCode", !ObjectUtils.isEmpty(basicObj.get("receiveOrgCreditCode")) ? String.valueOf(basicObj.get("receiveOrgCreditCode")) : String.valueOf(basicObj.get("receiveOrgCreditCode1")));
......@@ -563,7 +563,7 @@ public class CommonServiceImpl implements ICommonService {
noticeObj.put("receiveOrgCode", !ObjectUtils.isEmpty(basicObj.get("receiveOrgCreditCode")) ? String.valueOf(basicObj.get("receiveOrgCreditCode")) : String.valueOf(basicObj.get("receiveOrgCreditCode1")));
provideMap.put(YZGZ_PAGE_ID, noticeObj);
JSONObject jsonObject = new JSONObject(provideMap);
jgTransferNoticeService.saveNotice(submitType, jsonObject, reginParams);
return jgTransferNoticeService.saveNotice(submitType, jsonObject, reginParams);
} else if (type.equals(ApplicationFormTypeEnum.SYDJ.getBusinessCode())) {
noticeObj.put("receiveOrgCode", !ObjectUtils.isEmpty(basicObj.get("receiveOrgCreditCode")) ? String.valueOf(basicObj.get("receiveOrgCreditCode")) : String.valueOf(basicObj.get("receiveOrgCreditCode1")));
......@@ -571,7 +571,7 @@ public class CommonServiceImpl implements ICommonService {
if (submitType.equals("1")) {
jsonObject.put("submit", Boolean.TRUE);
}
jgUseRegistrationServiceImpl.save(jsonObject);
return jgUseRegistrationServiceImpl.save(jsonObject);
} else if (type.equals(ApplicationFormTypeEnum.GZBG.getBusinessCode())) {
//兼容业务逻辑代码
if (submitType.equals("1")) {
......
......@@ -471,7 +471,7 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
@Override
@SuppressWarnings({"Duplicates", "rawtypes"})
@Transactional(rollbackFor = Exception.class)
public void saveNotice(String submitType, JSONObject jgInstallationNoticeDtoMap, ReginParams reginParams) {
public List<JgInstallationNotice> saveNotice(String submitType, JSONObject jgInstallationNoticeDtoMap, ReginParams reginParams) {
JgInstallationNoticeDto model = JSON.parseObject(jgInstallationNoticeDtoMap.get(TABLE_PAGE_ID).toString(), JgInstallationNoticeDto.class);
// 字段转换
......@@ -517,6 +517,7 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
return jgRelationEquip.setEquipTransferId(String.valueOf(sequenceNbr));
}).collect(Collectors.toList());
jgInstallationNoticeEqMapper.insertBatchSomeColumn(jgRelationEquipList);
return list;
}
/**
......
......@@ -383,19 +383,19 @@ public class JgTransferNoticeServiceImpl extends BaseService<JgTransferNoticeDto
@Override
@SuppressWarnings({"Duplicates", "rawtypes"})
@Transactional(rollbackFor = Exception.class)
public void saveNotice(String submitType, Map<String, Object> jgTransferNoticeDtoMap, ReginParams reginParams) {
public List<JgTransferNotice> saveNotice(String submitType, Map<String, Object> jgTransferNoticeDtoMap, ReginParams reginParams) {
JgTransferNoticeDto model = JSON.parseObject(JSONObject.toJSONString(jgTransferNoticeDtoMap.get(TABLE_PAGE_ID)), JgTransferNoticeDto.class);
// 字段转换
convertField(model);
// 获取告知设备列表
List<Map<String, Object>> deviceList = model.getDeviceList();
if (CollectionUtils.isEmpty(deviceList)) {
return;
return new ArrayList<>();
}
// 获取告知单号
ResponseModel<List<String>> responseModel = tzsServiceFeignClient.applicationFormCode(ApplicationFormTypeEnum.YZGZ.getCode(), deviceList.size());
if (CollectionUtils.isEmpty(responseModel.getResult())) {
return;
return new ArrayList<>();
}
// 启动工作流并返回信息
List<WorkflowResultDto> workflowResultList = workFlowInfo(submitType, deviceList, model.getReceiveOrgCode());
......@@ -418,6 +418,7 @@ public class JgTransferNoticeServiceImpl extends BaseService<JgTransferNoticeDto
}).collect(Collectors.toList());
jgTransferNoticeEqMapper.insertBatchSomeColumn(jgRelationEquipList);
return list;
}
/**
......
......@@ -154,7 +154,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
}
@Transactional
public void save(JSONObject map) {
public JgUseRegistration save(JSONObject map) {
ReginParams reginParams = JSONObject.parseObject(redisUtils.get(RedisKey.buildReginKey(RequestContext.getExeUserId(), RequestContext.getToken())).toString(), ReginParams.class);
// 使用登记信息
JgUseRegistration jgUseRegistration = new JgUseRegistration();
......@@ -260,6 +260,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
list.add(dto);
commonServiceImpl.buildTaskModel(list);
}
return jgUseRegistration;
}
public JgUseRegistration updateData(Long sequenceNbr, String operate, WorkflowResultDto workflowResultDto, Boolean isFirst) {
......
......@@ -57,7 +57,7 @@ public enum BizTypeEnum {
public static String getNameByNum(String num) {
for (BizTypeEnum c : BizTypeEnum.values()) {
if (c.getCode().equals(num)){
if (c.getNum().equals(num)){
return c.getName();
}
}
......
......@@ -112,6 +112,9 @@
<if test="jyjcInspectionResultModel.inspectionUnitCode != '' and jyjcInspectionResultModel.inspectionUnitCode != null">
and res.inspection_unit_code = #{jyjcInspectionResultModel.inspectionUnitCode}
</if>
<if test="jyjcInspectionResultModel.applicationUnitName != '' and jyjcInspectionResultModel.applicationUnitName != null">
and bei1.use_unit like concat('%',#{jyjcInspectionResultModel.applicationUnitName},'%')
</if>
<choose>
<when test="identity == 'apply'">
and res.application_unit_code = #{jyjcInspectionResultModel.companyCode}
......
......@@ -80,9 +80,13 @@ public class JyjcOpeningApplicationController extends BaseController {
@TycloudOperation(ApiLevel = UserType.AGENCY)
@PutMapping(value = "/submit")
@ApiOperation(httpMethod = "PUT", value = "保存并提交", notes = "保存并提交")
public ResponseModel<JyjcOpeningApplicationModel> updateBySequenceNbrAndStartFlow(@RequestBody JSONObject jsonObject, @RequestParam(value = "sequenceNbr", required = false) Long sequenceNbr) {
public ResponseModel<List<JyjcOpeningApplicationModel>> updateBySequenceNbrAndStartFlow(@RequestBody JSONObject jsonObject, @RequestParam(value = "sequenceNbr", required = false) Long sequenceNbr) {
JyjcOpeningApplicationModel model = new JyjcOpeningApplicationModel();
BeanUtil.copyProperties(jsonObject.get("applyInfo"),model);
if (jsonObject.containsKey("applyInfo")) {
BeanUtil.copyProperties(jsonObject.get("applyInfo"), model);
} else {
BeanUtil.copyProperties(jsonObject, model);
}
model.setSequenceNbr(sequenceNbr);
if (sequenceNbr != null) {
JyjcOpeningApplicationModel jyjcOpeningApplicationModel = jyjcOpeningApplicationServiceImpl.queryDetail(sequenceNbr);
......@@ -90,7 +94,8 @@ public class JyjcOpeningApplicationController extends BaseController {
throw new BadRequest("企业资质信息和检验人员信息为空,无法提交!");
}
}
return ResponseHelper.buildResponse(jyjcOpeningApplicationServiceImpl.saveOrUpdateModel(model,true));
JyjcOpeningApplicationModel data = jyjcOpeningApplicationServiceImpl.saveOrUpdateModel(model, true);
return ResponseHelper.buildResponse(Collections.singletonList(data));
}
@Deprecated
......
......@@ -42,7 +42,7 @@
}, {
"type":"114",
"pageType": "look",
"url": "/mixuap?appId=1742358052905971713&id=1735201757841092609&roleIds={roleIds}&userId={userId}&pageType=edit"
"url": "/mixuap?appId=1742358052905971713&id=1735201757841092609&roleIds={roleIds}&userId={userId}&pageType=look"
}, {
"type":"114",
"pageType": "edit",
......
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