Commit cf427df7 authored by LiuLin's avatar LiuLin

fix(JG):维修告知,启用停用,保存接口添加返回值

parent 0ce07456
...@@ -6,8 +6,7 @@ import com.baomidou.mybatisplus.extension.service.IService; ...@@ -6,8 +6,7 @@ import com.baomidou.mybatisplus.extension.service.IService;
import com.yeejoin.amos.boot.biz.common.bo.ReginParams; import com.yeejoin.amos.boot.biz.common.bo.ReginParams;
import com.yeejoin.amos.boot.module.jg.api.dto.JgMaintainNoticeDto; import com.yeejoin.amos.boot.module.jg.api.dto.JgMaintainNoticeDto;
import com.yeejoin.amos.boot.module.jg.api.entity.JgMaintainNotice; import com.yeejoin.amos.boot.module.jg.api.entity.JgMaintainNotice;
import jdk.nashorn.api.scripting.JSObject; import java.util.List;
import java.util.Map; import java.util.Map;
/** /**
...@@ -57,7 +56,7 @@ public interface IJgMaintainNoticeService extends IService<JgMaintainNotice> { ...@@ -57,7 +56,7 @@ public interface IJgMaintainNoticeService extends IService<JgMaintainNotice> {
* @param model 数据 * @param model 数据
* @param submitType 保存类型 * @param submitType 保存类型
*/ */
void saveNotice(String submitType, Map<String, Object> model, ReginParams reginParams); List<JgMaintainNotice> saveNotice(String submitType, Map<String, Object> model, ReginParams reginParams);
/** /**
* 打印告知单 * 打印告知单
......
...@@ -4,25 +4,17 @@ import com.alibaba.fastjson.JSONObject; ...@@ -4,25 +4,17 @@ import com.alibaba.fastjson.JSONObject;
import com.yeejoin.amos.boot.biz.common.bo.ReginParams; import com.yeejoin.amos.boot.biz.common.bo.ReginParams;
import com.yeejoin.amos.boot.biz.common.utils.RedisKey; import com.yeejoin.amos.boot.biz.common.utils.RedisKey;
import com.yeejoin.amos.boot.biz.common.utils.RedisUtils; import com.yeejoin.amos.boot.biz.common.utils.RedisUtils;
import com.yeejoin.amos.boot.module.jg.api.dto.JgUseRegistrationEqDto;
import com.yeejoin.amos.boot.module.jg.api.entity.JgEnableDisable;
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.Map; import java.util.Map;
import com.yeejoin.amos.boot.module.jg.biz.service.impl.JgEnableDisableServiceImpl; import com.yeejoin.amos.boot.module.jg.biz.service.impl.JgEnableDisableServiceImpl;
import org.typroject.tyboot.core.foundation.context.RequestContext; import org.typroject.tyboot.core.foundation.context.RequestContext;
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;
import javax.servlet.http.HttpServletRequest;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.module.jg.api.dto.JgEnableDisableDto; import com.yeejoin.amos.boot.module.jg.api.dto.JgEnableDisableDto;
...@@ -54,8 +46,7 @@ public class JgEnableDisableController extends BaseController { ...@@ -54,8 +46,7 @@ public class JgEnableDisableController extends BaseController {
@ApiOperation(httpMethod = "POST", value = "新增", notes = "新增") @ApiOperation(httpMethod = "POST", value = "新增", notes = "新增")
public ResponseModel<Object> save(@RequestBody JSONObject map) { public ResponseModel<Object> save(@RequestBody JSONObject map) {
ReginParams reginParams = JSONObject.parseObject(redisUtils.get(RedisKey.buildReginKey(RequestContext.getExeUserId(), RequestContext.getToken())).toString(), ReginParams.class); ReginParams reginParams = JSONObject.parseObject(redisUtils.get(RedisKey.buildReginKey(RequestContext.getExeUserId(), RequestContext.getToken())).toString(), ReginParams.class);
jgEnableDisableServiceImpl.saveOrUpdate(map, reginParams); return ResponseHelper.buildResponse(jgEnableDisableServiceImpl.saveOrUpdate(map, reginParams));
return ResponseHelper.buildResponse("ok");
} }
@TycloudOperation(ApiLevel = UserType.AGENCY) @TycloudOperation(ApiLevel = UserType.AGENCY)
......
...@@ -47,11 +47,9 @@ public class JgMaintainNoticeController extends BaseController { ...@@ -47,11 +47,9 @@ public class JgMaintainNoticeController 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<String> save(@RequestParam String submitType, @RequestBody Map<String, Object> model) { public ResponseModel<Object> save(@RequestParam String submitType, @RequestBody Map<String, Object> model) {
ReginParams reginParams = getSelectedOrgInfo(); ReginParams reginParams = getSelectedOrgInfo();
return ResponseHelper.buildResponse(iJgMaintainNoticeService.saveNotice(submitType, model, reginParams));
iJgMaintainNoticeService.saveNotice(submitType, model, reginParams);
return ResponseHelper.buildResponse("");
} }
/** /**
......
...@@ -557,7 +557,7 @@ public class CommonServiceImpl implements ICommonService { ...@@ -557,7 +557,7 @@ public class CommonServiceImpl implements ICommonService {
noticeObj.put("receiveOrgCode", !ObjectUtils.isEmpty(basicObj.get("receiveOrgCreditCode")) ? String.valueOf(basicObj.get("receiveOrgCreditCode")) : String.valueOf(basicObj.get("receiveOrgCreditCode1"))); noticeObj.put("receiveOrgCode", !ObjectUtils.isEmpty(basicObj.get("receiveOrgCreditCode")) ? String.valueOf(basicObj.get("receiveOrgCreditCode")) : String.valueOf(basicObj.get("receiveOrgCreditCode1")));
provideMap.put(WXGZ_PAGE_ID, noticeObj); provideMap.put(WXGZ_PAGE_ID, noticeObj);
JSONObject jsonObject = new JSONObject(provideMap); JSONObject jsonObject = new JSONObject(provideMap);
iJgMaintainNoticeService.saveNotice(submitType, jsonObject, reginParams); return iJgMaintainNoticeService.saveNotice(submitType, jsonObject, reginParams);
} else if (type.equals(ApplicationFormTypeEnum.YZGZ.getBusinessCode())) { } else if (type.equals(ApplicationFormTypeEnum.YZGZ.getBusinessCode())) {
noticeObj.put("receiveOrgCode", !ObjectUtils.isEmpty(basicObj.get("receiveOrgCreditCode")) ? String.valueOf(basicObj.get("receiveOrgCreditCode")) : String.valueOf(basicObj.get("receiveOrgCreditCode1"))); noticeObj.put("receiveOrgCode", !ObjectUtils.isEmpty(basicObj.get("receiveOrgCreditCode")) ? String.valueOf(basicObj.get("receiveOrgCreditCode")) : String.valueOf(basicObj.get("receiveOrgCreditCode1")));
...@@ -621,7 +621,7 @@ public class CommonServiceImpl implements ICommonService { ...@@ -621,7 +621,7 @@ public class CommonServiceImpl implements ICommonService {
noticeObj.put("formType", "add"); noticeObj.put("formType", "add");
noticeObj.put("receiveOrgCode", !ObjectUtils.isEmpty(basicObj.get("receiveOrgCreditCode")) ? String.valueOf(basicObj.get("receiveOrgCreditCode")) : String.valueOf(basicObj.get("receiveOrgCreditCode1"))); noticeObj.put("receiveOrgCode", !ObjectUtils.isEmpty(basicObj.get("receiveOrgCreditCode")) ? String.valueOf(basicObj.get("receiveOrgCreditCode")) : String.valueOf(basicObj.get("receiveOrgCreditCode1")));
JSONObject jsonObject = new JSONObject(noticeObj); JSONObject jsonObject = new JSONObject(noticeObj);
jgEnableDisableServiceImpl.saveOrUpdate(jsonObject, reginParams); return jgEnableDisableServiceImpl.saveOrUpdate(jsonObject, reginParams);
} }
return null; return null;
} }
......
...@@ -86,7 +86,7 @@ public class JgEnableDisableServiceImpl extends BaseService<JgEnableDisableDto, ...@@ -86,7 +86,7 @@ public class JgEnableDisableServiceImpl extends BaseService<JgEnableDisableDto,
ICmWorkflowService iCmWorkflowService; ICmWorkflowService iCmWorkflowService;
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public void saveOrUpdate(JSONObject map, ReginParams reginParams) { public List<JgEnableDisable> saveOrUpdate(JSONObject map, ReginParams reginParams) {
JgEnableDisable jgEnableDisable = new JgEnableDisable(); JgEnableDisable jgEnableDisable = new JgEnableDisable();
if (!"null".equals(String.valueOf(map.get("sequenceNbr")))) { if (!"null".equals(String.valueOf(map.get("sequenceNbr")))) {
jgEnableDisable = this.baseMapper.selectById(String.valueOf(map.get("sequenceNbr"))); jgEnableDisable = this.baseMapper.selectById(String.valueOf(map.get("sequenceNbr")));
...@@ -211,7 +211,7 @@ public class JgEnableDisableServiceImpl extends BaseService<JgEnableDisableDto, ...@@ -211,7 +211,7 @@ public class JgEnableDisableServiceImpl extends BaseService<JgEnableDisableDto,
jgEnableDisableEq.setEnableDisableApplyId(jgEnableDisable.getSequenceNbr().toString()); jgEnableDisableEq.setEnableDisableApplyId(jgEnableDisable.getSequenceNbr().toString());
jgEnableDisableEqService.saveOrUpdate(jgEnableDisableEq); jgEnableDisableEqService.saveOrUpdate(jgEnableDisableEq);
} }
return Collections.singletonList(jgEnableDisable);
} }
/** /**
......
...@@ -216,7 +216,7 @@ public class JgEquipTransferServiceImpl extends BaseService<JgEquipTransferDto, ...@@ -216,7 +216,7 @@ public class JgEquipTransferServiceImpl extends BaseService<JgEquipTransferDto,
.startUserId(taskV2Model.getStartUserId()) .startUserId(taskV2Model.getStartUserId())
.startUser(taskV2Model.getStartUser()) .startUser(taskV2Model.getStartUser())
.startDate(taskV2Model.getStartDate()) .startDate(taskV2Model.getStartDate())
//.pageType("edit") .pageType(statusEnum.getCode() == 6614 ? "edit" : "look")
.model(taskMessageDto) .model(taskMessageDto)
.nextExecuteUser(workflowResultDto.getNextExecutorRoleIds()) .nextExecuteUser(workflowResultDto.getNextExecutorRoleIds())
.build(); .build();
......
...@@ -397,7 +397,7 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto ...@@ -397,7 +397,7 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto
@Override @Override
@SuppressWarnings({"Duplicates", "rawtypes"}) @SuppressWarnings({"Duplicates", "rawtypes"})
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public void saveNotice(String submitType, Map<String, Object> jgMaintainNoticeDtoMap, ReginParams reginParams) { public List<JgMaintainNotice> saveNotice(String submitType, Map<String, Object> jgMaintainNoticeDtoMap, ReginParams reginParams) {
JgMaintainNoticeDto model = JSON.parseObject(JSONObject.toJSONString(jgMaintainNoticeDtoMap.get(TABLE_PAGE_ID)), JgMaintainNoticeDto.class); JgMaintainNoticeDto model = JSON.parseObject(JSONObject.toJSONString(jgMaintainNoticeDtoMap.get(TABLE_PAGE_ID)), JgMaintainNoticeDto.class);
...@@ -470,6 +470,7 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto ...@@ -470,6 +470,7 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto
return jgRelationEquip.setEquipTransferId(String.valueOf(sequenceNbr)); return jgRelationEquip.setEquipTransferId(String.valueOf(sequenceNbr));
}).collect(Collectors.toList()); }).collect(Collectors.toList());
jgMaintainNoticeEqMapper.insertBatchSomeColumn(jgRelationEquipList); jgMaintainNoticeEqMapper.insertBatchSomeColumn(jgRelationEquipList);
return list;
} }
/** /**
......
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