|
@@ -1,17 +1,20 @@
|
|
|
package com.imcs.admin.business.controller;
|
|
|
|
|
|
+import com.imcs.admin.business.dao.UserDao;
|
|
|
import com.imcs.admin.business.service.BigScreenDetailService;
|
|
|
import com.imcs.admin.business.service.BusinessService;
|
|
|
import com.imcs.admin.common.PageParam;
|
|
|
import com.imcs.admin.common.Result;
|
|
|
import com.imcs.admin.common.constants.Constants;
|
|
|
import com.imcs.admin.common.data.Obj;
|
|
|
+import com.imcs.admin.rbac.data.User;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.data.redis.core.RedisTemplate;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
+import java.util.List;
|
|
|
import java.util.Map;
|
|
|
|
|
|
@RestController
|
|
@@ -22,288 +25,13 @@ public class BusinessController {
|
|
|
|
|
|
@Autowired
|
|
|
private RedisTemplate redisTemplate;
|
|
|
+ @Autowired
|
|
|
+ private UserDao userDao;
|
|
|
|
|
|
-
|
|
|
- /**
|
|
|
- * 销售订单生成为生产令
|
|
|
- * @param id
|
|
|
- * @return
|
|
|
- */
|
|
|
- @GetMapping("/sales/{id}")
|
|
|
- public Result getRefresh(@PathVariable("id") Long id){
|
|
|
- businessService.salesProductionOrder(id);
|
|
|
- return Result.success();
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * 批量 销售订单生成为生产令
|
|
|
- * @param map
|
|
|
- * @return
|
|
|
- */
|
|
|
-
|
|
|
- @PostMapping("/sales/ids")
|
|
|
- public Result getRefreshBatch(@RequestBody Map<String,Object> map){
|
|
|
- String[] ids = map.get("ids").toString().split(",");
|
|
|
- for (String item:ids){
|
|
|
- businessService.salesProductionOrder(Long.valueOf(item));
|
|
|
- }
|
|
|
- return Result.success();
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * 生产令拆批
|
|
|
- * @param map
|
|
|
- * @return
|
|
|
- */
|
|
|
- @PostMapping("/productionOrder/batchSplit")
|
|
|
- public Result batchSplit(@RequestBody Map<String,Object> map){
|
|
|
- businessService.batchSplit(map);
|
|
|
- return Result.success();
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
- /**
|
|
|
- * 生产令下发成为设计分发
|
|
|
- * @param id
|
|
|
- * @return
|
|
|
- */
|
|
|
- @GetMapping("/productionOrder/{id}")
|
|
|
- public Result productionOrder(@PathVariable("id") Long id){
|
|
|
- businessService.productionOrder(id);
|
|
|
- return Result.success();
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * 批量 生产令下发成为设计分发
|
|
|
- * @param map
|
|
|
- * @return
|
|
|
- */
|
|
|
-
|
|
|
- @PostMapping("/productionOrder/ids")
|
|
|
- public Result productionOrderBatch(@RequestBody Map<String,Object> map){
|
|
|
- String[] ids = map.get("ids").toString().split(",");
|
|
|
- for (String item:ids){
|
|
|
- businessService.productionOrder(Long.valueOf(item));
|
|
|
- }
|
|
|
- return Result.success();
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
- /**
|
|
|
- * 设计分发任务->设计、工艺、材料、采购、NC程序 任务
|
|
|
- * @param id
|
|
|
- * @return
|
|
|
- */
|
|
|
- @GetMapping("/productionPreparationTask/{id}")
|
|
|
- public Result productionPreparationTask(@PathVariable("id") Long id){
|
|
|
- businessService.productionPreparationTask(id);
|
|
|
- return Result.success();
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * 批量 设计分发任务->设计、工艺、材料、采购、NC程序 任务
|
|
|
- * @param map
|
|
|
- * @return
|
|
|
- */
|
|
|
-
|
|
|
- @PostMapping("/productionPreparationTask/ids")
|
|
|
- public Result productionPreparationTaskBatch(@RequestBody Map<String,Object> map){
|
|
|
- String[] ids = map.get("ids").toString().split(",");
|
|
|
- for (String item:ids){
|
|
|
- businessService.productionPreparationTask(Long.valueOf(item));
|
|
|
- }
|
|
|
- return Result.success();
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
- /**
|
|
|
- * 工艺路径 设置 有效
|
|
|
- * @param id
|
|
|
- * @param parentId
|
|
|
- * @return
|
|
|
- */
|
|
|
- @GetMapping("/processVersion/status/{id}/{parentId}")
|
|
|
- public Result processVersion(@PathVariable("id") Long id,@PathVariable("parentId") Long parentId){
|
|
|
- businessService.processVersion(id,parentId);
|
|
|
- return Result.success();
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * 生产排产
|
|
|
- * @param id
|
|
|
- * @return
|
|
|
- */
|
|
|
- @GetMapping("/orderToProcedure/{id}")
|
|
|
- public Result orderToProcedure(@PathVariable("id") Long id){
|
|
|
- businessService.orderToProcedure(id);
|
|
|
- return Result.success();
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * 批量 生产排产
|
|
|
- * @param map
|
|
|
- * @return
|
|
|
- */
|
|
|
-
|
|
|
- @PostMapping("/orderToProcedure/ids")
|
|
|
- public Result orderToProcedureBatch(@RequestBody Map<String,Object> map){
|
|
|
- String[] ids = map.get("ids").toString().split(",");
|
|
|
- for (String item:ids){
|
|
|
- businessService.orderToProcedure(Long.valueOf(item));
|
|
|
- }
|
|
|
- return Result.success();
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
- /**
|
|
|
- * 生产任务 批量审批
|
|
|
- * @param map
|
|
|
- * @return
|
|
|
- */
|
|
|
- @PostMapping("/productionWorkOrder/batchApplyStatus")
|
|
|
- public Result batchApplyStatus(@RequestBody Map<String,Object> map){
|
|
|
- businessService.batchApplyStatus(map);
|
|
|
- return Result.success();
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * 领料
|
|
|
- * @param id
|
|
|
- * @return
|
|
|
- */
|
|
|
- @GetMapping("/aProductionWorkOrder/receive/{id}")
|
|
|
- public Result receive(@PathVariable("id") Long id){
|
|
|
- businessService.receive(id);
|
|
|
- return Result.success();
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * 批量 领料
|
|
|
- * @param map
|
|
|
- * @return
|
|
|
- */
|
|
|
- @PostMapping("/aProductionWorkOrder/receive/ids")
|
|
|
- public Result receive(@RequestBody Map<String,Object> map){
|
|
|
- String[] ids = map.get("ids").toString().split(",");
|
|
|
- for (String item:ids){
|
|
|
- try {
|
|
|
- businessService.receive(Long.valueOf(item));
|
|
|
- }catch (Exception e){
|
|
|
-
|
|
|
- }
|
|
|
-
|
|
|
- }
|
|
|
- return Result.success();
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * 报工
|
|
|
- * @param id
|
|
|
- * @return
|
|
|
- */
|
|
|
- @PostMapping("/reportAmount/{id}")
|
|
|
- public Result reportAmount(@RequestBody Map<String,Object> map,@PathVariable Long id){
|
|
|
- businessService.reportAmount(id,map);
|
|
|
- return Result.success();
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * 批量 报工
|
|
|
- * @param map
|
|
|
- * @return
|
|
|
- */
|
|
|
-
|
|
|
- @PostMapping("/reportAmount/ids")
|
|
|
- public Result reportAmount(@RequestBody Map<String,Object> map){
|
|
|
- String[] ids = map.get("ids").toString().split(",");
|
|
|
- for (String item:ids){
|
|
|
- businessService.reportAmount(Long.valueOf(item),map);
|
|
|
- }
|
|
|
-
|
|
|
- return Result.success();
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * 出入库任务
|
|
|
- * @param id
|
|
|
- * @return
|
|
|
- */
|
|
|
- @GetMapping("/inOut/{id}")
|
|
|
- public Result inOut(@PathVariable("id") Long id){
|
|
|
- businessService.inOut(id);
|
|
|
- return Result.success();
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
- @PostMapping("/inOut/ids")
|
|
|
- public Result inOutBatch(@RequestBody Map<String,Object> map){
|
|
|
- String[] ids = map.get("ids").toString().split(",");
|
|
|
- for (String item:ids){
|
|
|
- try {
|
|
|
- businessService.inOut(Long.valueOf(item));
|
|
|
- }catch (Exception e){
|
|
|
-
|
|
|
- }
|
|
|
-
|
|
|
- }
|
|
|
- return Result.success();
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * 完工入库
|
|
|
- * @param id
|
|
|
- * @return
|
|
|
- */
|
|
|
- @GetMapping("/productIn/{id}")
|
|
|
- public Result productIn(@PathVariable("id") Long id){
|
|
|
- businessService.productIn(id);
|
|
|
- return Result.success();
|
|
|
- }
|
|
|
-
|
|
|
- @PostMapping("/productIn/ids")
|
|
|
- public Result productInBatch(@RequestBody Map<String,Object> map){
|
|
|
- String[] ids = map.get("ids").toString().split(",");
|
|
|
- for (String item:ids){
|
|
|
- businessService.productIn(Long.valueOf(item));
|
|
|
-
|
|
|
- }
|
|
|
- return Result.success();
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * 报废
|
|
|
- * @param map
|
|
|
- * @param id
|
|
|
- * @return
|
|
|
- */
|
|
|
- @PostMapping("/scrapAmount/{id}")
|
|
|
- public Result scrapAmount(@RequestBody Map<String,Object> map,@PathVariable Long id){
|
|
|
- businessService.scrapAmount(id,map);
|
|
|
- return Result.success();
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * 关闭销售订单
|
|
|
- * @param id
|
|
|
- * @return
|
|
|
- */
|
|
|
- @GetMapping("/updateSales/{id}")
|
|
|
- public Result updateSales(@PathVariable("id") Long id){
|
|
|
- businessService.updateSales(id);
|
|
|
- return Result.success();
|
|
|
- }
|
|
|
-
|
|
|
- @GetMapping("/printer/{workCode}")
|
|
|
- public Result printer(@PathVariable("workCode") String workCode){
|
|
|
- businessService.printer(workCode);
|
|
|
- return Result.success();
|
|
|
- }
|
|
|
-
|
|
|
- @PostMapping("/knives/save")
|
|
|
- public Result knivesSave(@RequestBody Map<String,Object> map){
|
|
|
- businessService.knivesSave(map);
|
|
|
- return Result.success();
|
|
|
+ @GetMapping("/userList")
|
|
|
+ public Result getList(){
|
|
|
+ List<User> userList = userDao.getUserList();
|
|
|
+ return new Result<>(userList);
|
|
|
}
|
|
|
|
|
|
}
|