Commit 8ce2544f authored by tianyiming's avatar tianyiming

维保修改

parent 797c9245
...@@ -6,6 +6,8 @@ import com.alibaba.fastjson.JSONObject; ...@@ -6,6 +6,8 @@ import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
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.controller.BaseController; import com.yeejoin.amos.boot.biz.common.controller.BaseController;
import com.yeejoin.amos.boot.biz.common.utils.RedisKey;
import com.yeejoin.amos.boot.biz.common.utils.RedisUtils;
import com.yeejoin.amos.boot.module.jg.api.dto.JgMaintenanceContractDto; import com.yeejoin.amos.boot.module.jg.api.dto.JgMaintenanceContractDto;
import com.yeejoin.amos.boot.module.jg.api.entity.JgMaintenanceContract; import com.yeejoin.amos.boot.module.jg.api.entity.JgMaintenanceContract;
import com.yeejoin.amos.boot.module.jg.api.vo.JgMaintenanceContractVo; import com.yeejoin.amos.boot.module.jg.api.vo.JgMaintenanceContractVo;
...@@ -15,6 +17,7 @@ import io.swagger.annotations.ApiOperation; ...@@ -15,6 +17,7 @@ import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.ObjectUtils; import org.springframework.util.ObjectUtils;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import org.typroject.tyboot.core.foundation.context.RequestContext;
import org.typroject.tyboot.core.foundation.enumeration.UserType; import org.typroject.tyboot.core.foundation.enumeration.UserType;
import org.typroject.tyboot.core.restful.doc.TycloudOperation; import org.typroject.tyboot.core.restful.doc.TycloudOperation;
import org.typroject.tyboot.core.restful.utils.ResponseHelper; import org.typroject.tyboot.core.restful.utils.ResponseHelper;
...@@ -36,6 +39,9 @@ public class JgMaintenanceContractController extends BaseController { ...@@ -36,6 +39,9 @@ public class JgMaintenanceContractController extends BaseController {
@Autowired @Autowired
JgMaintenanceContractServiceImpl jgMaintenanceContractServiceImpl; JgMaintenanceContractServiceImpl jgMaintenanceContractServiceImpl;
@Autowired
RedisUtils redisUtils;
/** /**
* 新增(提交) * 新增(提交)
* *
...@@ -170,6 +176,7 @@ public class JgMaintenanceContractController extends BaseController { ...@@ -170,6 +176,7 @@ public class JgMaintenanceContractController extends BaseController {
@ApiOperation(httpMethod = "POST", value = "执行流程", notes = "执行流程") @ApiOperation(httpMethod = "POST", value = "执行流程", notes = "执行流程")
public ResponseModel<Object> flowExecute(@RequestBody JSONObject map) { public ResponseModel<Object> flowExecute(@RequestBody JSONObject map) {
jgMaintenanceContractServiceImpl.flowExecute(Long.valueOf(String.valueOf(map.get("sequenceNbr"))),String.valueOf(map.get("instanceId")), String.valueOf(map.get("operate")), String.valueOf(map.get("comment")), true); jgMaintenanceContractServiceImpl.flowExecute(Long.valueOf(String.valueOf(map.get("sequenceNbr"))),String.valueOf(map.get("instanceId")), String.valueOf(map.get("operate")), String.valueOf(map.get("comment")), true);
ReginParams reginParams = JSONObject.parseObject(redisUtils.get(RedisKey.buildReginKey(RequestContext.getExeUserId(), RequestContext.getToken())).toString(), ReginParams.class);
if (map.containsKey("formData") && !ObjectUtils.isEmpty(map.get("formData"))){ if (map.containsKey("formData") && !ObjectUtils.isEmpty(map.get("formData"))){
JgMaintenanceContract dto = new JgMaintenanceContract(); JgMaintenanceContract dto = new JgMaintenanceContract();
Map<String, Object> formData = (Map<String, Object>)map.get("formData"); Map<String, Object> formData = (Map<String, Object>)map.get("formData");
...@@ -188,6 +195,7 @@ public class JgMaintenanceContractController extends BaseController { ...@@ -188,6 +195,7 @@ public class JgMaintenanceContractController extends BaseController {
result.setMaintenanceManagerTwoId(maintenanceManagerTwoInfo[0]); result.setMaintenanceManagerTwoId(maintenanceManagerTwoInfo[0]);
result.setMaintenanceManagerTwoName(maintenanceManagerTwoInfo[1]); result.setMaintenanceManagerTwoName(maintenanceManagerTwoInfo[1]);
result.setMaintenanceManagerTwoPhone(dto.getMaintenanceManagerTwoPhone()); result.setMaintenanceManagerTwoPhone(dto.getMaintenanceManagerTwoPhone());
result.setPromoter(reginParams.getUserModel().getUserId());
} }
jgMaintenanceContractServiceImpl.getBaseMapper().updateById(result); jgMaintenanceContractServiceImpl.getBaseMapper().updateById(result);
} }
......
...@@ -461,7 +461,6 @@ public class JgMaintenanceContractServiceImpl extends BaseService<JgMaintenanceC ...@@ -461,7 +461,6 @@ public class JgMaintenanceContractServiceImpl extends BaseService<JgMaintenanceC
jgMaintenanceContract.setNextExecuteIds(role); jgMaintenanceContract.setNextExecuteIds(role);
jgMaintenanceContract.setPromoter(reginParams.getUserModel().getUserId()); jgMaintenanceContract.setPromoter(reginParams.getUserModel().getUserId());
jgMaintenanceContract.setInstanceId(instanceId); jgMaintenanceContract.setInstanceId(instanceId);
jgMaintenanceContract.setApplyDate(new Date());
if (!ObjectUtils.isEmpty(jgMaintenanceContract.getInstanceStatus())) { if (!ObjectUtils.isEmpty(jgMaintenanceContract.getInstanceStatus())) {
jgMaintenanceContract.setInstanceStatus(jgMaintenanceContract.getInstanceStatus() + "," + role); jgMaintenanceContract.setInstanceStatus(jgMaintenanceContract.getInstanceStatus() + "," + role);
} else { } else {
...@@ -477,6 +476,7 @@ public class JgMaintenanceContractServiceImpl extends BaseService<JgMaintenanceC ...@@ -477,6 +476,7 @@ public class JgMaintenanceContractServiceImpl extends BaseService<JgMaintenanceC
} }
}else { }else {
jgMaintenanceContract.setApplyDate(new Date());
jgMaintenanceContract.setStatus(taskCode); jgMaintenanceContract.setStatus(taskCode);
} }
this.getBaseMapper().updateById(jgMaintenanceContract); this.getBaseMapper().updateById(jgMaintenanceContract);
......
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