|
|
@ -21,6 +21,9 @@ import java.util.*; |
|
|
import java.util.concurrent.*; |
|
|
import java.util.concurrent.*; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* 用于仓库的配置类 |
|
|
|
|
|
*/ |
|
|
@RestController |
|
|
@RestController |
|
|
@RequestMapping("/repository") |
|
|
@RequestMapping("/repository") |
|
|
public class DepositoryController { |
|
|
public class DepositoryController { |
|
|
@ -91,6 +94,11 @@ public class DepositoryController { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* 获取所有没有父级的仓库列表 |
|
|
|
|
|
* @param request |
|
|
|
|
|
* @return |
|
|
|
|
|
*/ |
|
|
@GetMapping("/getDepositoryForNoParent") |
|
|
@GetMapping("/getDepositoryForNoParent") |
|
|
public RestResponse getDepositoryForNoParent(HttpServletRequest request) { |
|
|
public RestResponse getDepositoryForNoParent(HttpServletRequest request) { |
|
|
List<Depository> depositoryForNoParent = depositoryService.findDepositoryForNoParent(); |
|
|
List<Depository> depositoryForNoParent = depositoryService.findDepositoryForNoParent(); |
|
|
@ -120,8 +128,6 @@ public class DepositoryController { |
|
|
paramForAdminitions.put("superior", 313); |
|
|
paramForAdminitions.put("superior", 313); |
|
|
paramForAdminitions.put("state", 1); |
|
|
paramForAdminitions.put("state", 1); |
|
|
paramForAdminitions.put("level", 3);; |
|
|
paramForAdminitions.put("level", 3);; |
|
|
// Map<String, Object> administration = PublicConfig.findAdministration(userKey, token);
|
|
|
|
|
|
// List<AdministrationP> administrationPList = ObjectFormatUtil.objToList(administration.get("administrationPList"), AdministrationP.class);
|
|
|
|
|
|
List<AdministrationP> administrationPList = administrativeService.findAdministrationPListByCondition(paramForAdminitions); |
|
|
List<AdministrationP> administrationPList = administrativeService.findAdministrationPListByCondition(paramForAdminitions); |
|
|
for (Depository depository : list) { |
|
|
for (Depository depository : list) { |
|
|
for (AdministrationP administrationP : administrationPList) { |
|
|
for (AdministrationP administrationP : administrationPList) { |
|
|
@ -334,7 +340,7 @@ public class DepositoryController { |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
// 获取各类别库存容量
|
|
|
// 获取各类别库存容量(暂时弃用)
|
|
|
@RequestMapping(value = "/layui/echart_back_invetory", method = RequestMethod.GET) |
|
|
@RequestMapping(value = "/layui/echart_back_invetory", method = RequestMethod.GET) |
|
|
@ResponseBody |
|
|
@ResponseBody |
|
|
public Map<String, Object> echart_back_MaterialTypeInventory(@RequestParam Map<String, Object> map, HttpServletRequest request) { |
|
|
public Map<String, Object> echart_back_MaterialTypeInventory(@RequestParam Map<String, Object> map, HttpServletRequest request) { |
|
|
@ -358,7 +364,6 @@ public class DepositoryController { |
|
|
parm.put("end", months.get(num)); |
|
|
parm.put("end", months.get(num)); |
|
|
parm.put("oldId", materialType.getOldId()); |
|
|
parm.put("oldId", materialType.getOldId()); |
|
|
//根据条件获取月份中物料的总额
|
|
|
//根据条件获取月份中物料的总额
|
|
|
// 测试
|
|
|
|
|
|
Double materialCountByMonth1 = depositoryRecordService.calMaterialTypeTopCount(parm); |
|
|
Double materialCountByMonth1 = depositoryRecordService.calMaterialTypeTopCount(parm); |
|
|
((Map<String, Object>) sourceList.get(num)).put(materialType.getTname(), materialCountByMonth1); |
|
|
((Map<String, Object>) sourceList.get(num)).put(materialType.getTname(), materialCountByMonth1); |
|
|
} |
|
|
} |
|
|
@ -369,8 +374,7 @@ public class DepositoryController { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* 获取上周 |
|
|
* 获取上周echart数据 |
|
|
* |
|
|
|
|
|
* @return |
|
|
* @return |
|
|
*/ |
|
|
*/ |
|
|
@RequestMapping(value = "/layui/echart_back_lastWeek", method = RequestMethod.GET) |
|
|
@RequestMapping(value = "/layui/echart_back_lastWeek", method = RequestMethod.GET) |
|
|
@ -466,7 +470,7 @@ public class DepositoryController { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* 获取本周 |
|
|
* 获取本周echart数据 |
|
|
* |
|
|
* |
|
|
* @return |
|
|
* @return |
|
|
*/ |
|
|
*/ |
|
|
@ -1120,11 +1124,9 @@ public class DepositoryController { |
|
|
return new RestResponse(result); |
|
|
return new RestResponse(result); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
// 构造仓库二维码
|
|
|
// 构造仓库条码
|
|
|
@PostMapping("/createQrCode") |
|
|
@PostMapping("/createQrCode") |
|
|
public RestResponse createQrCode(@RequestBody Map<String, Object> map) { |
|
|
public RestResponse createQrCode(@RequestBody Map<String, Object> map) { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Long depositoryId = ObjectFormatUtil.toLong(map.get("depositoryId")); |
|
|
Long depositoryId = ObjectFormatUtil.toLong(map.get("depositoryId")); |
|
|
Depository depository = depositoryService.findDepositoryById(depositoryId); |
|
|
Depository depository = depositoryService.findDepositoryById(depositoryId); |
|
|
String qrCode = depositoryService.findQrCodeByDepository(depository.getId()); |
|
|
String qrCode = depositoryService.findQrCodeByDepository(depository.getId()); |
|
|
@ -1137,8 +1139,7 @@ public class DepositoryController { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* 用于打印图片 |
|
|
* 用于导出图片 |
|
|
* |
|
|
|
|
|
* @param map |
|
|
* @param map |
|
|
* @param request |
|
|
* @param request |
|
|
* @param response |
|
|
* @param response |
|
|
|