| | |
| | | |
| | | import com.github.pagehelper.PageInfo; |
| | | import com.whyc.dto.Response; |
| | | import com.whyc.dto.WorksheetMainDTO; |
| | | import com.whyc.dto.WorksheetMainDTO2; |
| | | import com.whyc.pojo.DocUser; |
| | | import com.whyc.pojo.WorksheetMain; |
| | | import com.whyc.service.WorksheetMainService; |
| | |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.io.IOException; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | |
| | | } |
| | | } |
| | | |
| | | @PostMapping("componentRelatedSubmit") |
| | | @ApiOperation(value="散装件-产品审批提交") |
| | | public Response componentProductSubmit(@RequestBody WorksheetMainDTO mainDTO){ |
| | | DocUser user = ActionUtil.getUser(); |
| | | boolean res = service.componentProductSubmit(mainDTO,user); |
| | | if(res) { |
| | | return new Response().set(1,true, "提交完成"); |
| | | }else{ |
| | | return new Response().set(1,false,"角色无法提交审批"); |
| | | } |
| | | } |
| | | |
| | | @PostMapping("componentSubmit") |
| | | @ApiOperation(value="散装件审批提交") |
| | | public Response componentSubmit(@RequestBody WorksheetMain main){ |
| | | Response<Object> response = new Response<>(); |
| | | DocUser user = ActionUtil.getUser(); |
| | | Response res = service.componentSubmit(main,user); |
| | | if(res.getCode()==1) { |
| | | response.set(1,true, "提交完成"); |
| | | }else if(res.getCode()==3){ |
| | | response.set(1,false,"角色无法提交审批"); |
| | | }else{ |
| | | //重复提交 |
| | | Object existCAList = res.getData(); |
| | | Object existComponentList = res.getData2(); |
| | | response.setCode(1); |
| | | response.setData(false); |
| | | response.setData2(existCAList); |
| | | response.setData3(existComponentList); |
| | | if(res.getCode()==21){ |
| | | response.setMsg("重复提交:现有散装件及正在进行审批的散装件中,存在当前提交上传的散装件"); |
| | | }else if(res.getCode()==22){ |
| | | response.setMsg("重复提交:正在进行审批的散装件中,存在当前提交上传的散装件"); |
| | | }else{ |
| | | response.setMsg("重复提交:现有散装件中,存在当前提交上传的散装件"); |
| | | } |
| | | } |
| | | return response; |
| | | } |
| | | |
| | | @PostMapping("productSoftwareSubmit") |
| | | @ApiOperation(value="产品软件审批提交") |
| | | public Response productSoftwareSubmit(@RequestBody WorksheetMainDTO2 mainDTO) throws IOException { |
| | | DocUser user = ActionUtil.getUser(); |
| | | return service.productSoftwareSubmit(mainDTO,user); |
| | | } |
| | | |
| | | @GetMapping("statusStatistic") |
| | | @ApiOperation("获取工作流-各角色用户对应的工作台数据分类统计") |
| | | public Response<Map<String,Integer>> getStatusStatistic(){ |