从源更新

This commit is contained in:
qiankunpingtai
2019-06-06 18:13:41 +08:00
40 changed files with 106 additions and 153 deletions

View File

@@ -417,7 +417,7 @@ public class DepotHeadController {
JSONObject result = ExceptionConstants.standardSuccess();
if(("open").equals(mybatisPlusStatus)) {
Long billsNumLimit = Long.parseLong(request.getSession().getAttribute("billsNumLimit").toString());
Long count = depotHeadService.countDepotHead(null,null,null,null,null,null);
Long count = depotHeadService.countDepotHead(null,null,null,null,null,null,null);
if(count>= billsNumLimit) {
throw new BusinessParamCheckingException(ExceptionConstants.DEPOT_HEAD_OVER_LIMIT_FAILED_CODE,
ExceptionConstants.DEPOT_HEAD_OVER_LIMIT_FAILED_MSG);

View File

@@ -42,44 +42,6 @@ public class DepotItemController {
@Resource
private MaterialService materialService;
/**
* 根据材料信息获取
* @param materialParam 商品参数
* @param depotIds 拥有的仓库信息
* @param request
* @return
*/
@GetMapping(value = "/getHeaderIdByMaterial")
public BaseResponseInfo getHeaderIdByMaterial(@RequestParam("materialParam") String materialParam,
@RequestParam("depotIds") String depotIds,
HttpServletRequest request)throws Exception {
BaseResponseInfo res = new BaseResponseInfo();
try {
List<DepotItemVo4HeaderId> depotItemList = depotItemService.getHeaderIdByMaterial(materialParam, depotIds);
String allReturn = "";
if (depotItemList != null&&depotItemList.size()>0) {
for (DepotItemVo4HeaderId d : depotItemList) {
Long dl = d.getHeaderid(); //获取对象
allReturn = allReturn + dl.toString() + ",";
}
/**
* 2019-01-17修复depotItemList集合为空时程序异常
* */
allReturn = allReturn.substring(0, allReturn.length() - 1);
}
if (allReturn.equals("null")) {
allReturn = "";
}
res.code = 200;
res.data = allReturn;
} catch(Exception e){
e.printStackTrace();
res.code = 500;
res.data = "获取数据失败";
}
return res;
}
/**
* 只根据商品id查询单据列表
* @param mId

View File

@@ -32,6 +32,20 @@ public class ResourceController {
return JsonUtils.ok();
}
@GetMapping(value = "/{apiName}/info")
public String getList(@PathVariable("apiName") String apiName,
@RequestParam("id") Long id,
HttpServletRequest request) throws Exception {
Object obj = configResourceManager.selectOne(apiName, id);
Map<String, Object> objectMap = new HashMap<String, Object>();
if(obj != null) {
objectMap.put("info", obj);
return returnJson(objectMap, ErpInfo.OK.name, ErpInfo.OK.code);
} else {
return returnJson(objectMap, ErpInfo.ERROR.name, ErpInfo.ERROR.code);
}
}
@GetMapping(value = "/{apiName}/list")
public String getList(@PathVariable("apiName") String apiName,
@RequestParam(value = Constants.PAGE_SIZE, required = false) Integer pageSize,