提交 f4da5acd authored 作者: wangkr's avatar wangkr

update

上级 9a900571
...@@ -168,7 +168,14 @@ public class JzMessageController extends CyPaginationController<JzMessage> { ...@@ -168,7 +168,14 @@ public class JzMessageController extends CyPaginationController<JzMessage> {
CyMessCons.MESSAGE_ALERT_ERROR, CyMessCons.MESSAGE_ALERT_ERROR,
null); null);
} }
@ApiOperation(value = "所有状态改成选址", notes = "所有状态改成选址")
@PostMapping(value = "/changeStatus")
public CyResult changeStatus(@RequestParam("projectCode") String projectCode) {
return CyResultGenUtil.builder(jzMessageServiceImpl.changeStatus(projectCode),
CyMessCons.MESSAGE_ALERT_SUCCESS,
CyMessCons.MESSAGE_ALERT_ERROR,
projectCode);
}
@ApiOperation(value = "完成任务", notes = "完成任务") @ApiOperation(value = "完成任务", notes = "完成任务")
@GetMapping(value = "/completeTask") @GetMapping(value = "/completeTask")
......
...@@ -623,5 +623,9 @@ public interface JzMessageRepository extends CyBaseMapper<JzMessage> { ...@@ -623,5 +623,9 @@ public interface JzMessageRepository extends CyBaseMapper<JzMessage> {
") " + ") " +
") </script>") ") </script>")
List<JzMessage> processIsEnd(@Param("templateType")String templateType,@Param("projectCode") String projectCode); List<JzMessage> processIsEnd(@Param("templateType")String templateType,@Param("projectCode") String projectCode);
@Update("<script>update jz_message set jzState=#{status} where project_code=#{projectCode}</script>")
int updateByprojecetCode(@Param("projcetCode")String projectCode,@Param("status")String status);
} }
...@@ -152,4 +152,12 @@ public interface JzMessageService { ...@@ -152,4 +152,12 @@ public interface JzMessageService {
* @return * @return
*/ */
Boolean processIsEnd(String templateType,String projectCode); Boolean processIsEnd(String templateType,String projectCode);
/**
* @author: jiangpengpeng
* @description: 改变项目状态为待选址
* @date: 2019/11/15 15:48
* @param projectCode
* @return
*/
CyPersistModel changeStatus(String projectCode);
} }
...@@ -13,6 +13,7 @@ import org.activiti.engine.task.Task; ...@@ -13,6 +13,7 @@ import org.activiti.engine.task.Task;
import org.activiti.model.CyPIAndTaskModel; import org.activiti.model.CyPIAndTaskModel;
import org.activiti.service.CyWfService; import org.activiti.service.CyWfService;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.apache.ibatis.annotations.Update;
import org.apache.poi.hssf.usermodel.*; import org.apache.poi.hssf.usermodel.*;
import org.apache.poi.ss.usermodel.HorizontalAlignment; import org.apache.poi.ss.usermodel.HorizontalAlignment;
import org.apache.poi.ss.usermodel.VerticalAlignment; import org.apache.poi.ss.usermodel.VerticalAlignment;
...@@ -402,11 +403,11 @@ public class JzMessageServiceImpl extends CyBaseService implements JzMessageServ ...@@ -402,11 +403,11 @@ public class JzMessageServiceImpl extends CyBaseService implements JzMessageServ
processMid.setTemplateid(jzMessage.getTemplateId()); processMid.setTemplateid(jzMessage.getTemplateId());
} }
//设置version 版本为空设置为1,反之加1 //设置version 版本为空设置为1,反之加1
String version = processMidRepository.processMidByprocessMid(processMid); List<String> version = processMidRepository.processMidByprocessMid(processMid);
if (StringUtils.isEmpty(version)) { if (StringUtils.isEmpty(version.get(0))) {
processMid.setVersion("1"); processMid.setVersion("1");
} else { } else {
processMid.setVersion(String.valueOf(Integer.valueOf(version) + 1)); processMid.setVersion(String.valueOf(Integer.valueOf(version.get(0)) + 1));
} }
CyPersistModel save = processMidServiceImpl.save(processMid); CyPersistModel save = processMidServiceImpl.save(processMid);
if (save.getInfluence()<1){ if (save.getInfluence()<1){
...@@ -1207,4 +1208,16 @@ public class JzMessageServiceImpl extends CyBaseService implements JzMessageServ ...@@ -1207,4 +1208,16 @@ public class JzMessageServiceImpl extends CyBaseService implements JzMessageServ
} }
return i; return i;
} }
@Override
public CyPersistModel changeStatus(String projectCode) {
if (StringUtils.isNotEmpty(projectCode)){
int i = jzMessageRepository.updateByprojecetCode(projectCode,BaseStationStatus.IT_WAIT_LOCATION.getStatus());
return new CyPersistModel(i);
}
return new CyPersistModel(0);
}
} }
\ No newline at end of file
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论