123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507 |
- package com.steerinfo.ems.emsgmpcjh.controller;
- import com.alibaba.fastjson.JSON;
- import com.steerinfo.auth.utils.JwtUtil;
- import com.steerinfo.ems.Utils.DateUtils;
- import com.steerinfo.ems.Utils.ExcelToolUtils;
- import com.steerinfo.ems.Utils.WebSocket;
- import com.steerinfo.ems.emsgmpcjh.mapper.EmsGmPcJhMapper;
- import com.steerinfo.ems.emsgmpcjh.model.EmsGmPcJh;
- import com.steerinfo.ems.emsgmpcjh.service.IEmsGmPcJhService;
- import com.steerinfo.ems.emsprodplanweightadjustment.mapper.EmsProdplanWeightAdjustmentMapper;
- import com.steerinfo.ems.emsprodplanweightadjustment.model.EmsProdplanWeightAdjustment;
- import com.steerinfo.framework.controller.BaseRESTfulController;
- import com.steerinfo.framework.controller.RESTfulResult;
- import com.steerinfo.framework.service.pagehelper.PageList;
- import io.swagger.annotations.ApiImplicitParam;
- import io.swagger.annotations.ApiImplicitParams;
- import io.swagger.annotations.ApiOperation;
- import org.springframework.beans.factory.annotation.Autowired;
- import org.springframework.web.bind.annotation.*;
- import org.springframework.web.multipart.MultipartFile;
- import java.io.File;
- import java.math.BigDecimal;
- import java.util.Date;
- import java.util.HashMap;
- import java.util.Map;
- /**
- * EmsGmPcJh RESTful接口:
- * @author generator
- * @version 1.0-SNAPSHORT 2021-09-10 07:00
- * 类描述
- * 修订历史:
- * 日期:2021-09-10
- * 作者:generator
- * 参考:
- * 描述:EmsGmPcJh RESTful接口
- * @see null
- * @Copyright 湖南视拓信息技术股份有限公司. All rights reserved.
- */
- @RestController
- @RequestMapping("/${api.version}/emsgmpcjhs")
- public class EmsGmPcJhController extends BaseRESTfulController {
- private static final String AT2005 = "G-G1-";
- private static final String AT2006 = "G-G2-";
- private static final String AT2004 = "G-L1-";
- private static final String AT2007 = "G-X1-";
- @Autowired
- IEmsGmPcJhService emsGmPcJhService;
- @Autowired
- EmsGmPcJhMapper emsGmPcJhMapper;
- @Autowired
- private WebSocket webSocket;
- @Autowired
- EmsProdplanWeightAdjustmentMapper emsProdplanWeightAdjustmentMapper;
- @ApiOperation(value="获取列表", notes="分页查询")
- @ApiImplicitParams({
- @ApiImplicitParam(name = "pageNum", value = "查询页数", required = false, dataType = "Integer"),
- @ApiImplicitParam(name = "pageSize", value = "每页记录数", required = false, dataType = "Integer")
- })
- //@RequiresPermissions("emsgmpcjh:view")
- @GetMapping(value = "/")
- public RESTfulResult list(@RequestParam HashMap parmas,Integer pageNum, Integer pageSize){
- if(parmas.get("grades") != null && !parmas.get("grades").toString().isEmpty()){
- String grades = parmas.get("grades").toString();
- if(!grades.startsWith("'")){
- grades = "'" + grades.replaceAll(",", "','").replaceAll(",", "','") + "'";
- }
- parmas.put("grades", grades);
- }
- if(parmas.get("specifications") != null && !parmas.get("specifications").toString().isEmpty()){
- String grades = parmas.get("specifications").toString();
- if(!grades.startsWith("'")){
- grades = "'" + grades.replaceAll(",", "','").replaceAll(",", "','") + "'";
- }
- parmas.put("specifications", grades);
- }
- if(parmas.get("lengthTimesWidth") != null && !parmas.get("lengthTimesWidth").toString().isEmpty()){
- String grades = parmas.get("lengthTimesWidth").toString();
- if(!grades.startsWith("'")){
- grades = "'" + grades.replaceAll(",", "','").replaceAll(",", "','") + "'";
- }
- parmas.put("lengthTimesWidth", grades);
- }
- PageList<EmsGmPcJh> list = emsGmPcJhService.queryForPage(parmas, pageNum, pageSize);
- return success(list);
- }
- @ApiOperation(value="获取列表", notes="分页模糊查询")
- @ApiImplicitParams({
- @ApiImplicitParam(name = "pageNum", value = "查询页数", required = false, dataType = "Integer"),
- @ApiImplicitParam(name = "pageSize", value = "每页记录数", required = false, dataType = "Integer")
- })
- //@RequiresPermissions("emsgmpcjh:view")
- @GetMapping(value = "/like/")
- public RESTfulResult listLike(@RequestParam HashMap parmas,Integer pageNum, Integer pageSize){
- PageList<EmsGmPcJh> list = emsGmPcJhService.queryLikeForPage(parmas, pageNum, pageSize);
- return success(list);
- }
- @ApiOperation(value="创建", notes="根据EmsGmPcJh对象创建GM计划")
- @ApiImplicitParam(name = "emsGmPcJh", value = "详细实体emsGmPcJh", required = true, dataType = "EmsGmPcJh")
- //@RequiresPermissions("emsgmpcjh:create")
- @PostMapping(value = "/")
- public RESTfulResult add(@RequestBody EmsGmPcJh model){
- String userId = JwtUtil.getUseridByToken();
- String yyyymmdd = DateUtils.dateStr(model.getJhTime(), "yyyyMMdd");
- model.setStartTime(yyyymmdd);
- model.setType(this.getType(model));
- String maxid = emsGmPcJhService.getMaxid(model);
- model.setId(maxid);
- model.setKxfWeight(model.getPlanWeight());
- model.setYxfWeight(new BigDecimal("0"));
- model.setCreateTime(new Date());
- model.setCreateMan(userId);
- EmsGmPcJh emsGmPcJh = emsGmPcJhService.add(model);
- EmsProdplanWeightAdjustment emsProdplanWeightAdjustment = new EmsProdplanWeightAdjustment();
- emsProdplanWeightAdjustment.setId(model.getId());
- emsProdplanWeightAdjustment.setAuditStatus("0");
- emsProdplanWeightAdjustment.setPlanWeight(model.getPlanWeight());
- emsProdplanWeightAdjustment.setPlanWeightOld(model.getPlanWeight());
- emsProdplanWeightAdjustmentMapper.insert(emsProdplanWeightAdjustment);
- return success(emsGmPcJh);
- }
- @ApiOperation(value="创建", notes="根据EmsGmPcJh对象创建GM计划")
- @ApiImplicitParam(name = "emsGmPcJh", value = "详细实体emsGmPcJh", required = true, dataType = "EmsGmPcJh")
- //@RequiresPermissions("emsgmpcjh:create")
- @PostMapping(value = "/addNbJH")
- public RESTfulResult addNbJH(@RequestBody EmsGmPcJh model){
- String userId = JwtUtil.getUseridByToken();
- String yyyymmdd = DateUtils.dateStr(model.getJhTime(), "yyyyMMdd");
- model.setStartTime(yyyymmdd);
- model.setType(this.getNbJH(model));
- String maxid = emsGmPcJhService.getMaxid(model);
- model.setId(maxid);
- model.setPlanWeight(model.getPlanWeight() == null ? new BigDecimal("0"): model.getPlanWeight());
- model.setKxfWeight(model.getPlanWeight() == null ? new BigDecimal("0"): model.getPlanWeight());
- model.setYxfWeight(new BigDecimal("0"));
- model.setCreateTime(new Date());
- model.setState("2");
- model.setCreateMan(userId);
- EmsGmPcJh emsGmPcJh = emsGmPcJhService.add(model);
- return success(emsGmPcJh);
- }
- @ApiOperation(value="获取详细信息", notes="根据url的id来获取详细信息")
- @ApiImplicitParam(paramType = "path", name = "id", value = "ID", required = true, dataType = "String")
- //@RequiresPermissions("emsgmpcjh:view")
- @GetMapping(value = "/{id}")
- public RESTfulResult get(@PathVariable String id){
- EmsGmPcJh emsGmPcJh = emsGmPcJhService.getById(id);
- return success(emsGmPcJh);
- }
- @ApiOperation(value="更新详细信息", notes="根据url的id来指定更新对象,并根据传过来的emsGmPcJh信息来更新详细信息")
- @ApiImplicitParams({
- @ApiImplicitParam(paramType = "path", name = "id", value = "ID", required = true, dataType = "String"),
- @ApiImplicitParam(name = "emsGmPcJh", value = "详细实体emsGmPcJh", required = true, dataType = "EmsGmPcJh")
- })
- //@RequiresPermissions("emsgmpcjh:update")
- @PutMapping(value = "/batchupdate", produces = "application/json;charset=UTF-8")
- public RESTfulResult update(@RequestBody EmsGmPcJh[] models){
- String userId = JwtUtil.getUseridByToken();
- for (EmsGmPcJh model : models) {
- EmsGmPcJh emsGmPcJh = this.emsGmPcJhMapper.selectByPrimaryKey(model.getId());
- if(emsGmPcJh.getState().equals("2")) {
- return failed(null,"操作失败,编号为"+emsGmPcJh.getId()+"已经下发");
- }
- if (emsGmPcJh.getState().equals("1")) {
- return failed(model, "操作失败,计划号为:" + model.getId() + "正在审核");
- }
- if (emsGmPcJh.getState().equals("3")) {
- return failed(model, "操作失败,计划号为:" + model.getId() + "已接收");
- }
- model.setYxfWeight(new BigDecimal("0"));
- model.setKxfWeight(model.getPlanWeight());
- model.setUpdateMan(userId);
- model.setUpdateTime(new Date());
- EmsProdplanWeightAdjustment emsProdplanWeightAdjustment = emsProdplanWeightAdjustmentMapper.selectByPrimaryKey(model.getId());
- emsProdplanWeightAdjustment.setPlanWeight(model.getPlanWeight());
- emsProdplanWeightAdjustment.setPlanWeightOld(model.getPlanWeight());
- emsGmPcJhMapper.updateByPrimaryKey(model);
- emsProdplanWeightAdjustmentMapper.updateByPrimaryKey(emsProdplanWeightAdjustment);
- }
- return success();
- }
- @ApiOperation(value="删除", notes="根据url的id来指定删除对象")
- @ApiImplicitParam(paramType = "path", name = "id", value = "ID", required = true, dataType = "String")
- //@RequiresPermissions("emsgmpcjh:delete")
- @DeleteMapping(value = "/delete",produces = "application/json;charset=UTF-8")//String
- public RESTfulResult delete(@RequestBody EmsGmPcJh[] models){
- for (EmsGmPcJh model : models) {
- EmsGmPcJh emsGmPcJh = this.emsGmPcJhMapper.selectByPrimaryKey(model.getId());
- if(emsGmPcJh.getState().equals("2")) {
- return failed(null,"操作失败,编号为"+emsGmPcJh.getId()+"已经下发");
- }
- if (model.getState().equals("1")) {
- return failed(null,"计划号为:"+model.getId()+"正在审核");
- }
- if (model.getState().equals("3")) {
- return failed(null,"计划号为:"+model.getId()+"已经接收");
- }
- emsGmPcJhMapper.deleteByPrimaryKey(model.getId());
- }
- return success();
- }
- @ApiOperation(value="更新详细信息", notes="根据url的id来指定更新对象,并根据传过来的emsGmPcJh信息来更新详细信息")
- @ApiImplicitParams({
- @ApiImplicitParam(paramType = "path", name = "id", value = "ID", required = true, dataType = "String"),
- @ApiImplicitParam(name = "emsGmPcJh", value = "详细实体emsGmPcJh", required = true, dataType = "EmsGmPcJh")
- })
- //@RequiresPermissions("emsgmpcjh:update")
- @PutMapping(value = "/updatestate", produces = "application/json;charset=UTF-8")
- public RESTfulResult updatestate(@RequestBody EmsGmPcJh[] models){
- String userId = JwtUtil.getUseridByToken();
- String soketMessage="国贸订单编号";
- boolean result = false;
- for (EmsGmPcJh model : models) {
- EmsGmPcJh emsGmPcJh = this.emsGmPcJhMapper.selectByPrimaryKey(model.getId());
- if(emsGmPcJh.getState().equals("2")) {
- return failed(null,"操作失败,编号为"+emsGmPcJh.getId()+"已经下发");
- }
- if (emsGmPcJh.getState().equals("3")) {
- return failed(null,"操作失败,编号为"+emsGmPcJh.getId()+"已经接收");
- }
- if (emsGmPcJh.getState().equals("1")) {
- return failed(null,"操作失败,编号为"+emsGmPcJh.getId()+"正在审核");
- }
- if(emsGmPcJh.getState().equals("0")) {
- result = true;
- soketMessage+=emsGmPcJh.getId()+",";
- }
- model.setYxfWeight(new BigDecimal("0"));
- model.setKxfWeight(model.getPlanWeight());
- model.setUpdateTime(new Date());
- model.setUpdateMan(userId);
- emsGmPcJhService.updateState(model);
- }
- if(result){
- soketMessage += "已下发,请注意接收";
- String[] roles = {"生产部-生产处"};
- Map <String, Object> map = new HashMap<String,Object>();
- map.put("role",roles);
- map.put("title","国贸订单下发");
- map.put("message",soketMessage);
- map.put("tips","您好,有新的国贸计划已下发,请注意接收。");
- soketMessage= JSON.toJSONString(map);
- webSocket.sendAllMessage(soketMessage);
- }
- return success();
- }
- @ApiOperation(value="更新详细信息", notes="根据url的id来指定更新对象,并根据传过来的emsGmPcJh信息来更新详细信息")
- @ApiImplicitParams({
- @ApiImplicitParam(paramType = "path", name = "id", value = "ID", required = true, dataType = "String"),
- @ApiImplicitParam(name = "emsGmPcJh", value = "详细实体emsGmPcJh", required = true, dataType = "EmsGmPcJh")
- })
- //@RequiresPermissions("emsgmpcjh:update")
- @PutMapping(value = "/submitaudit", produces = "application/json;charset=UTF-8")
- public RESTfulResult submitaudit(@RequestBody EmsGmPcJh[] models){
- String soketMessage="国贸订单编号";
- boolean result = false;
- String userId = JwtUtil.getUseridByToken();
- for (EmsGmPcJh model : models) {
- EmsGmPcJh emsGmPcJh = this.emsGmPcJhMapper.selectByPrimaryKey(model.getId());
- if(emsGmPcJh.getState().equals("2")) {
- return failed(null,"操作失败,编号为"+emsGmPcJh.getId()+"已经下发");
- }
- if (emsGmPcJh.getState().equals("3")) {
- return failed(null,"操作失败,编号为"+emsGmPcJh.getId()+"已经接收");
- }
- if (emsGmPcJh.getState().equals("1")) {
- return failed(null, "操作失败,编号为" + emsGmPcJh.getId() + "正在审核");
- }
- model.setYxfWeight(new BigDecimal("0"));
- model.setKxfWeight(model.getPlanWeight());
- model.setUpdateTime(new Date());
- model.setUpdateMan(userId);
- emsGmPcJhService.updateState(model);
- result = true;
- soketMessage+=emsGmPcJh.getId()+",";
- }
- if(result){
- soketMessage += "已提交审核,请注意接收";
- String[] roles = {"国贸-部门领导"};
- Map <String, Object> map = new HashMap<String,Object>();
- map.put("role",roles);
- map.put("title","国贸订单审核");
- map.put("message",soketMessage);
- map.put("tips","您好,有新的国贸计划已提交审核,请注意接收。");
- soketMessage= JSON.toJSONString(map);
- webSocket.sendAllMessage(soketMessage);
- }
- return success();
- }
- //@RequiresPermissions("emsgmpcjh:update")
- @PutMapping(value = "/passaudits", produces = "application/json;charset=UTF-8")
- public RESTfulResult passaudits(@RequestBody EmsGmPcJh[] models){
- String soketMessage="国贸订单编号";
- boolean result = false;
- String userId = JwtUtil.getUseridByToken();
- for (EmsGmPcJh model : models) {
- EmsGmPcJh emsGmPcJh = this.emsGmPcJhMapper.selectByPrimaryKey(model.getId());
- if(emsGmPcJh.getState().equals("2")) {
- return failed(null,"操作失败,编号为"+emsGmPcJh.getId()+"已经下发");
- }
- if (emsGmPcJh.getState().equals("3")) {
- return failed(null,"操作失败,编号为"+emsGmPcJh.getId()+"已经接收");
- }
- model.setUpdateMan(userId);
- emsGmPcJhService.updateState(model);
- result = true;
- soketMessage+=emsGmPcJh.getId()+",";
- if(result){
- soketMessage += "下发,请注意接收";
- String[] roles = {"生产部-生产处"};
- Map <String, Object> map = new HashMap<String,Object>();
- map.put("role",roles);
- map.put("title","国贸订单下发");
- map.put("message",soketMessage);
- map.put("tips","您好,有新的国贸计划已经下发,请注意接收。");
- soketMessage= JSON.toJSONString(map);
- webSocket.sendAllMessage(soketMessage);
- }
- }
- return success();
- }
- //@RequiresPermissions("emsgmpcjh:update")
- @PutMapping(value = "/turndown", produces = "application/json;charset=UTF-8")
- public RESTfulResult turndown(@RequestBody EmsGmPcJh[] models){
- String userId = JwtUtil.getUseridByToken();
- String soketMessage="国贸订单编号";
- boolean result = false;
- for (EmsGmPcJh model : models) {
- EmsGmPcJh emsGmPcJh = this.emsGmPcJhMapper.selectByPrimaryKey(model.getId());
- if (emsGmPcJh.getState().equals("3")) {
- return failed(null,"操作失败,编号为"+emsGmPcJh.getId()+"已经接收");
- }
- emsGmPcJhService.updateState(model);
- result = true;
- soketMessage+=emsGmPcJh.getId()+",";
- if(result){
- soketMessage += "已被撤回,请注意查看";
- String[] roles = {"国贸-业务人员"};
- Map <String, Object> map = new HashMap<String,Object>();
- map.put("role",roles);
- map.put("title","国贸订单审核");
- map.put("message",soketMessage);
- map.put("tips","您好,您提交的订单已被撤回,请注意查看。");
- soketMessage= JSON.toJSONString(map);
- webSocket.sendAllMessage(soketMessage);
- }
- }
- return success();
- }
- @ApiOperation(value="获取列表", notes="分页模糊查询")
- @ApiImplicitParams({
- @ApiImplicitParam(name = "pageNum", value = "查询页数", required = false, dataType = "Integer"),
- @ApiImplicitParam(name = "pageSize", value = "每页记录数", required = false, dataType = "Integer")
- })
- @GetMapping("/getGmDates")
- public RESTfulResult getGmDates(@RequestParam HashMap<String,Object> parmas,Integer pageNum,Integer pageSize){
- if(parmas.get("workprocType") != null && !parmas.get("workprocType").toString().isEmpty()){
- String workprocType = parmas.get("workprocType").toString();
- if(!workprocType.startsWith("'")){
- workprocType = "'" + workprocType.replaceAll(",", "','").replaceAll(",", "','") + "'";
- }
- parmas.put("workprocType", workprocType);
- }
- PageList<Map<String, Object>> gmPcJhDataForPage = emsGmPcJhService.getGmPcJhDataForPage(parmas, pageNum, pageSize);
- return success(gmPcJhDataForPage);
- }
- @ApiOperation(value="获取列表", notes="分页模糊查询")
- @ApiImplicitParams({
- @ApiImplicitParam(name = "pageNum", value = "查询页数", required = false, dataType = "Integer"),
- @ApiImplicitParam(name = "pageSize", value = "每页记录数", required = false, dataType = "Integer")
- })
- @GetMapping("/getXsDdDate")
- public RESTfulResult getXsDdDate(@RequestParam HashMap<String,Object> parmas,Integer pageNum,Integer pageSize){
- if(parmas.get("workprocType") != null && !parmas.get("workprocType").toString().isEmpty()){
- String workprocType = parmas.get("workprocType").toString();
- if(!workprocType.startsWith("'")){
- workprocType = "'" + workprocType.replaceAll(",", "','").replaceAll(",", "','") + "'";
- }
- parmas.put("workprocType", workprocType);
- }
- if(parmas.get("auditStatus") != null && !parmas.get("auditStatus").toString().isEmpty()){
- String auditStatus = parmas.get("auditStatus").toString();
- if(!auditStatus.startsWith("'")){
- auditStatus = "'" + auditStatus.replaceAll(",", "','").replaceAll(",", "','") + "'";
- }
- parmas.put("auditStatus", auditStatus);
- }
- PageList<Map<String, Object>> getXsDdDateForPage= emsGmPcJhService.getXsDdDate(parmas, pageNum, pageSize);
- return success(getXsDdDateForPage);
- }
- @ApiOperation(value="获取列表", notes="分页模糊查询")
- @ApiImplicitParams({
- @ApiImplicitParam(name = "pageNum", value = "查询页数", required = false, dataType = "Integer"),
- @ApiImplicitParam(name = "pageSize", value = "每页记录数", required = false, dataType = "Integer")
- })
- @GetMapping("/getShData")
- public RESTfulResult getShData(@RequestParam HashMap<String,Object> parmas,Integer pageNum,Integer pageSize){
- if(parmas.get("workprocType") != null && !parmas.get("workprocType").toString().isEmpty()){
- String workprocType = parmas.get("workprocType").toString();
- if(!workprocType.startsWith("'")){
- workprocType = "'" + workprocType.replaceAll(",", "','").replaceAll(",", "','") + "'";
- }
- parmas.put("workprocType", workprocType);
- }
- PageList<Map<String, Object>> xsShData = emsGmPcJhService.getXsShData(parmas, pageNum, pageSize);
- return success(xsShData);
- }
- @ApiOperation(value="更新详细信息", notes="根据url的id来指定更新对象,并根据传过来的emsGmPcJh信息来更新详细信息")
- @ApiImplicitParams({
- @ApiImplicitParam(paramType = "path", name = "id", value = "ID", required = true, dataType = "String"),
- @ApiImplicitParam(name = "emsGmPcJh", value = "详细实体emsGmPcJh", required = true, dataType = "EmsGmPcJh")
- })
- //@RequiresPermissions("emsgmpcjh:update")
- @PutMapping(value = "/batchcopy", produces = "application/json;charset=UTF-8")
- public RESTfulResult batchcopy(@RequestBody EmsGmPcJh[] models){
- String userId = JwtUtil.getUseridByToken();
- for (EmsGmPcJh model : models) {
- String yyyymmdd = DateUtils.dateStr(model.getJhTime(), "yyyyMMdd");
- model.setStartTime(yyyymmdd);
- model.setType(this.getType(model));
- String maxid = emsGmPcJhService.getMaxid(model);
- model.setId(maxid);
- model.setState("0");
- model.setKxfWeight(model.getPlanWeight());
- model.setYxfWeight(new BigDecimal("0"));
- model.setUpdateTime(null);
- model.setUpdateMan(null);
- model.setCreateTime(new Date());
- model.setCreateMan(userId);
- emsGmPcJhService.add(model);
- }
- return success();
- }
- /**
- * @MethodName excelimport
- * @Author TZH
- * @Description 导入文件
- * @Date 2021/01/12 15:20
- **/
- @PostMapping(value = "excelimport")
- public RESTfulResult excelimport(@RequestParam("file") MultipartFile file) throws Exception {
- RESTfulResult rs= null;
- try {
- if(file.isEmpty()){
- return failed(null,"上传失败,请选择文件");
- }
- String fileNmae = file.getOriginalFilename();
- File files = ExcelToolUtils.multipartFileToFile(file);
- rs = emsGmPcJhService.insertexcel(files);
- ExcelToolUtils.delteTempFile(files);
- } catch (Exception e){
- e.printStackTrace();
- rs.setCode("500");
- rs.setMessage("服务端异常!");
- }finally {
- }
- return rs;
- }
- public String getType (EmsGmPcJh emsGmPcJh){
- if (emsGmPcJh.getWorkprocType().equals("AT2004")){
- return AT2004;
- }
- if(emsGmPcJh.getWorkprocType().equals("AT2005")){
- return AT2005;
- }
- if (emsGmPcJh.getWorkprocType().equals("AT2006")){
- return AT2006;
- }
- if (emsGmPcJh.getWorkprocType().equals("AT2007")) {
- return AT2007;
- }
- return null;
- }
- public String getNbJH (EmsGmPcJh emsGmPcJh){
- if (emsGmPcJh.getWorkprocType().equals("AT2004")){
- return "N-L1-";
- }
- if(emsGmPcJh.getWorkprocType().equals("AT2005")){
- return "N-G1-";
- }
- if (emsGmPcJh.getWorkprocType().equals("AT2006")){
- return "N-G2-";
- }
- if (emsGmPcJh.getWorkprocType().equals("AT2007")) {
- return "N-X1-";
- }
- return null;
- }
- }
|