Commit 17cb1108 authored by qiankunpingtai's avatar qiankunpingtai
Browse files

异常封装之单据明细信息后台修改

parent ca6c23f2
...@@ -71,7 +71,7 @@ public class DepotHeadController { ...@@ -71,7 +71,7 @@ public class DepotHeadController {
* @return * @return
*/ */
@GetMapping(value = "/buildNumber") @GetMapping(value = "/buildNumber")
public BaseResponseInfo buildNumber(HttpServletRequest request) { public BaseResponseInfo buildNumber(HttpServletRequest request)throws Exception {
BaseResponseInfo res = new BaseResponseInfo(); BaseResponseInfo res = new BaseResponseInfo();
Map<String, Object> map = new HashMap<String, Object>(); Map<String, Object> map = new HashMap<String, Object>();
try { try {
...@@ -93,7 +93,7 @@ public class DepotHeadController { ...@@ -93,7 +93,7 @@ public class DepotHeadController {
* @return * @return
*/ */
@GetMapping(value = "/getMaxId") @GetMapping(value = "/getMaxId")
public BaseResponseInfo getMaxId(HttpServletRequest request) { public BaseResponseInfo getMaxId(HttpServletRequest request)throws Exception {
BaseResponseInfo res = new BaseResponseInfo(); BaseResponseInfo res = new BaseResponseInfo();
Map<String, Object> map = new HashMap<String, Object>(); Map<String, Object> map = new HashMap<String, Object>();
try { try {
...@@ -117,7 +117,7 @@ public class DepotHeadController { ...@@ -117,7 +117,7 @@ public class DepotHeadController {
*/ */
@GetMapping(value = "/findByMonth") @GetMapping(value = "/findByMonth")
public BaseResponseInfo findByMonth(@RequestParam("monthTime") String monthTime, public BaseResponseInfo findByMonth(@RequestParam("monthTime") String monthTime,
HttpServletRequest request) { HttpServletRequest request)throws Exception {
BaseResponseInfo res = new BaseResponseInfo(); BaseResponseInfo res = new BaseResponseInfo();
Map<String, Object> map = new HashMap<String, Object>(); Map<String, Object> map = new HashMap<String, Object>();
try { try {
...@@ -164,7 +164,7 @@ public class DepotHeadController { ...@@ -164,7 +164,7 @@ public class DepotHeadController {
@RequestParam("beginTime") String beginTime, @RequestParam("beginTime") String beginTime,
@RequestParam("endTime") String endTime, @RequestParam("endTime") String endTime,
@RequestParam("type") String type, @RequestParam("type") String type,
HttpServletRequest request) { HttpServletRequest request)throws Exception {
BaseResponseInfo res = new BaseResponseInfo(); BaseResponseInfo res = new BaseResponseInfo();
Map<String, Object> map = new HashMap<String, Object>(); Map<String, Object> map = new HashMap<String, Object>();
try { try {
...@@ -211,7 +211,7 @@ public class DepotHeadController { ...@@ -211,7 +211,7 @@ public class DepotHeadController {
@RequestParam("beginTime") String beginTime, @RequestParam("beginTime") String beginTime,
@RequestParam("endTime") String endTime, @RequestParam("endTime") String endTime,
@RequestParam("type") String type, @RequestParam("type") String type,
HttpServletRequest request) { HttpServletRequest request)throws Exception {
BaseResponseInfo res = new BaseResponseInfo(); BaseResponseInfo res = new BaseResponseInfo();
Map<String, Object> map = new HashMap<String, Object>(); Map<String, Object> map = new HashMap<String, Object>();
try { try {
...@@ -254,7 +254,7 @@ public class DepotHeadController { ...@@ -254,7 +254,7 @@ public class DepotHeadController {
@RequestParam("endTime") String endTime, @RequestParam("endTime") String endTime,
@RequestParam("organId") Integer organId, @RequestParam("organId") Integer organId,
@RequestParam("supType") String supType, @RequestParam("supType") String supType,
HttpServletRequest request) { HttpServletRequest request) throws Exception{
BaseResponseInfo res = new BaseResponseInfo(); BaseResponseInfo res = new BaseResponseInfo();
Map<String, Object> map = new HashMap<String, Object>(); Map<String, Object> map = new HashMap<String, Object>();
try { try {
...@@ -338,7 +338,7 @@ public class DepotHeadController { ...@@ -338,7 +338,7 @@ public class DepotHeadController {
public BaseResponseInfo findTotalPay(@RequestParam("supplierId") Integer supplierId, public BaseResponseInfo findTotalPay(@RequestParam("supplierId") Integer supplierId,
@RequestParam("endTime") String endTime, @RequestParam("endTime") String endTime,
@RequestParam("supType") String supType, @RequestParam("supType") String supType,
HttpServletRequest request) { HttpServletRequest request)throws Exception {
BaseResponseInfo res = new BaseResponseInfo(); BaseResponseInfo res = new BaseResponseInfo();
Map<String, Object> map = new HashMap<String, Object>(); Map<String, Object> map = new HashMap<String, Object>();
try { try {
...@@ -376,7 +376,7 @@ public class DepotHeadController { ...@@ -376,7 +376,7 @@ public class DepotHeadController {
*/ */
@GetMapping(value = "/getDetailByNumber") @GetMapping(value = "/getDetailByNumber")
public BaseResponseInfo getDetailByNumber(@RequestParam("number") String number, public BaseResponseInfo getDetailByNumber(@RequestParam("number") String number,
HttpServletRequest request) { HttpServletRequest request)throws Exception {
BaseResponseInfo res = new BaseResponseInfo(); BaseResponseInfo res = new BaseResponseInfo();
DepotHeadVo4List dhl = new DepotHeadVo4List(); DepotHeadVo4List dhl = new DepotHeadVo4List();
try { try {
...@@ -403,7 +403,7 @@ public class DepotHeadController { ...@@ -403,7 +403,7 @@ public class DepotHeadController {
* @param mode 合计或者金额 * @param mode 合计或者金额
* @return * @return
*/ */
public BigDecimal allMoney(String getS, String type, String subType, String mode, String endTime) { public BigDecimal allMoney(String getS, String type, String subType, String mode, String endTime)throws Exception {
BigDecimal allMoney = BigDecimal.ZERO; BigDecimal allMoney = BigDecimal.ZERO;
try { try {
Integer supplierId = Integer.valueOf(getS); Integer supplierId = Integer.valueOf(getS);
......
...@@ -51,7 +51,7 @@ public class DepotItemController { ...@@ -51,7 +51,7 @@ public class DepotItemController {
@GetMapping(value = "/getHeaderIdByMaterial") @GetMapping(value = "/getHeaderIdByMaterial")
public BaseResponseInfo getHeaderIdByMaterial(@RequestParam("materialParam") String materialParam, public BaseResponseInfo getHeaderIdByMaterial(@RequestParam("materialParam") String materialParam,
@RequestParam("depotIds") String depotIds, @RequestParam("depotIds") String depotIds,
HttpServletRequest request) { HttpServletRequest request)throws Exception {
BaseResponseInfo res = new BaseResponseInfo(); BaseResponseInfo res = new BaseResponseInfo();
try { try {
List<DepotItemVo4HeaderId> depotItemList = depotItemService.getHeaderIdByMaterial(materialParam, depotIds); List<DepotItemVo4HeaderId> depotItemList = depotItemService.getHeaderIdByMaterial(materialParam, depotIds);
...@@ -89,7 +89,7 @@ public class DepotItemController { ...@@ -89,7 +89,7 @@ public class DepotItemController {
public String findDetailByTypeAndMaterialId( public String findDetailByTypeAndMaterialId(
@RequestParam(value = Constants.PAGE_SIZE, required = false) Integer pageSize, @RequestParam(value = Constants.PAGE_SIZE, required = false) Integer pageSize,
@RequestParam(value = Constants.CURRENT_PAGE, required = false) Integer currentPage, @RequestParam(value = Constants.CURRENT_PAGE, required = false) Integer currentPage,
@RequestParam("materialId") String mId, HttpServletRequest request) { @RequestParam("materialId") String mId, HttpServletRequest request)throws Exception {
Map<String, String> parameterMap = ParamUtils.requestToMap(request); Map<String, String> parameterMap = ParamUtils.requestToMap(request);
parameterMap.put("mId", mId); parameterMap.put("mId", mId);
PageQueryInfo queryInfo = new PageQueryInfo(); PageQueryInfo queryInfo = new PageQueryInfo();
...@@ -139,7 +139,7 @@ public class DepotItemController { ...@@ -139,7 +139,7 @@ public class DepotItemController {
@RequestParam("projectId") Integer pid, @RequestParam("projectId") Integer pid,
@RequestParam("materialId") String mId, @RequestParam("materialId") String mId,
@RequestParam("monthTime") String monthTime, @RequestParam("monthTime") String monthTime,
HttpServletRequest request) { HttpServletRequest request) throws Exception{
Map<String, String> parameterMap = ParamUtils.requestToMap(request); Map<String, String> parameterMap = ParamUtils.requestToMap(request);
parameterMap.put("mId", mId); parameterMap.put("mId", mId);
parameterMap.put("monthTime", monthTime); parameterMap.put("monthTime", monthTime);
...@@ -203,7 +203,7 @@ public class DepotItemController { ...@@ -203,7 +203,7 @@ public class DepotItemController {
@RequestParam(value = Constants.CURRENT_PAGE, required = false) Integer currentPage, @RequestParam(value = Constants.CURRENT_PAGE, required = false) Integer currentPage,
@RequestParam("materialId") String mId, @RequestParam("materialId") String mId,
@RequestParam("monthTime") String monthTime, @RequestParam("monthTime") String monthTime,
HttpServletRequest request) { HttpServletRequest request) throws Exception{
Map<String, String> parameterMap = ParamUtils.requestToMap(request); Map<String, String> parameterMap = ParamUtils.requestToMap(request);
parameterMap.put("mId", mId); parameterMap.put("mId", mId);
parameterMap.put("monthTime", monthTime); parameterMap.put("monthTime", monthTime);
...@@ -250,7 +250,7 @@ public class DepotItemController { ...@@ -250,7 +250,7 @@ public class DepotItemController {
* @param mId * @param mId
* @return * @return
*/ */
public int sumNumberByMaterialId(String type, Long mId) { public int sumNumberByMaterialId(String type, Long mId)throws Exception {
int allNumber = 0; int allNumber = 0;
try { try {
allNumber = depotItemService.findByTypeAndMaterialId(type, mId); allNumber = depotItemService.findByTypeAndMaterialId(type, mId);
...@@ -291,7 +291,7 @@ public class DepotItemController { ...@@ -291,7 +291,7 @@ public class DepotItemController {
* *
* @return * @return
*/ */
public String findUnitName(Long mId) { public String findUnitName(Long mId)throws Exception {
String unitName = ""; String unitName = "";
try { try {
unitName = materialService.findUnitName(mId); unitName = materialService.findUnitName(mId);
...@@ -310,7 +310,7 @@ public class DepotItemController { ...@@ -310,7 +310,7 @@ public class DepotItemController {
@GetMapping(value = "/getDetailList") @GetMapping(value = "/getDetailList")
public BaseResponseInfo getDetailList(@RequestParam("headerId") Long headerId, public BaseResponseInfo getDetailList(@RequestParam("headerId") Long headerId,
@RequestParam("mpList") String mpList, @RequestParam("mpList") String mpList,
HttpServletRequest request) { HttpServletRequest request)throws Exception {
BaseResponseInfo res = new BaseResponseInfo(); BaseResponseInfo res = new BaseResponseInfo();
Map<String, Object> map = new HashMap<String, Object>(); Map<String, Object> map = new HashMap<String, Object>();
try { try {
...@@ -382,7 +382,7 @@ public class DepotItemController { ...@@ -382,7 +382,7 @@ public class DepotItemController {
* *
* @return * @return
*/ */
public String getOtherInfo(String[] mpArr, DepotItemVo4WithInfoEx diEx) { public String getOtherInfo(String[] mpArr, DepotItemVo4WithInfoEx diEx)throws Exception {
String materialOther = ""; String materialOther = "";
for (int i = 0; i < mpArr.length; i++) { for (int i = 0; i < mpArr.length; i++) {
if (mpArr[i].equals("颜色")) { if (mpArr[i].equals("颜色")) {
...@@ -427,7 +427,7 @@ public class DepotItemController { ...@@ -427,7 +427,7 @@ public class DepotItemController {
@RequestParam("headIds") String headIds, @RequestParam("headIds") String headIds,
@RequestParam("materialIds") String materialIds, @RequestParam("materialIds") String materialIds,
@RequestParam("mpList") String mpList, @RequestParam("mpList") String mpList,
HttpServletRequest request) { HttpServletRequest request)throws Exception {
BaseResponseInfo res = new BaseResponseInfo(); BaseResponseInfo res = new BaseResponseInfo();
Map<String, Object> map = new HashMap<String, Object>(); Map<String, Object> map = new HashMap<String, Object>();
try { try {
...@@ -497,7 +497,7 @@ public class DepotItemController { ...@@ -497,7 +497,7 @@ public class DepotItemController {
@RequestParam("monthTime") String monthTime, @RequestParam("monthTime") String monthTime,
@RequestParam("headIds") String headIds, @RequestParam("headIds") String headIds,
@RequestParam("materialIds") String materialIds, @RequestParam("materialIds") String materialIds,
HttpServletRequest request) { HttpServletRequest request) throws Exception{
BaseResponseInfo res = new BaseResponseInfo(); BaseResponseInfo res = new BaseResponseInfo();
Map<String, Object> map = new HashMap<String, Object>(); Map<String, Object> map = new HashMap<String, Object>();
try { try {
...@@ -540,7 +540,7 @@ public class DepotItemController { ...@@ -540,7 +540,7 @@ public class DepotItemController {
@RequestParam("headIds") String headIds, @RequestParam("headIds") String headIds,
@RequestParam("materialIds") String materialIds, @RequestParam("materialIds") String materialIds,
@RequestParam("mpList") String mpList, @RequestParam("mpList") String mpList,
HttpServletRequest request) { HttpServletRequest request)throws Exception {
BaseResponseInfo res = new BaseResponseInfo(); BaseResponseInfo res = new BaseResponseInfo();
Map<String, Object> map = new HashMap<String, Object>(); Map<String, Object> map = new HashMap<String, Object>();
try { try {
...@@ -600,7 +600,7 @@ public class DepotItemController { ...@@ -600,7 +600,7 @@ public class DepotItemController {
@RequestParam("headIds") String headIds, @RequestParam("headIds") String headIds,
@RequestParam("materialIds") String materialIds, @RequestParam("materialIds") String materialIds,
@RequestParam("mpList") String mpList, @RequestParam("mpList") String mpList,
HttpServletRequest request) { HttpServletRequest request)throws Exception {
BaseResponseInfo res = new BaseResponseInfo(); BaseResponseInfo res = new BaseResponseInfo();
Map<String, Object> map = new HashMap<String, Object>(); Map<String, Object> map = new HashMap<String, Object>();
try { try {
...@@ -665,7 +665,7 @@ public class DepotItemController { ...@@ -665,7 +665,7 @@ public class DepotItemController {
@RequestParam("monthTime") String monthTime, @RequestParam("monthTime") String monthTime,
@RequestParam("headIds") String headIds, @RequestParam("headIds") String headIds,
@RequestParam("materialIds") String materialIds, @RequestParam("materialIds") String materialIds,
HttpServletRequest request, HttpServletResponse response) { HttpServletRequest request, HttpServletResponse response)throws Exception {
BaseResponseInfo res = new BaseResponseInfo(); BaseResponseInfo res = new BaseResponseInfo();
Map<String, Object> map = new HashMap<String, Object>(); Map<String, Object> map = new HashMap<String, Object>();
String message = "成功"; String message = "成功";
...@@ -731,7 +731,7 @@ public class DepotItemController { ...@@ -731,7 +731,7 @@ public class DepotItemController {
* @param isPrev * @param isPrev
* @return * @return
*/ */
public BigDecimal sumNumber(String type, Integer ProjectId, Long MId, String MonthTime, Boolean isPrev) { public BigDecimal sumNumber(String type, Integer ProjectId, Long MId, String MonthTime, Boolean isPrev)throws Exception {
BigDecimal sumNumber = BigDecimal.ZERO; BigDecimal sumNumber = BigDecimal.ZERO;
try { try {
BigDecimal sum = depotItemService.findByType(type, ProjectId, MId, MonthTime, isPrev); BigDecimal sum = depotItemService.findByType(type, ProjectId, MId, MonthTime, isPrev);
...@@ -744,7 +744,7 @@ public class DepotItemController { ...@@ -744,7 +744,7 @@ public class DepotItemController {
return sumNumber; return sumNumber;
} }
public BigDecimal assembleNumber(String subType, String mType, Integer ProjectId, Long MId, String MonthTime, Boolean isPrev) { public BigDecimal assembleNumber(String subType, String mType, Integer ProjectId, Long MId, String MonthTime, Boolean isPrev) throws Exception{
BigDecimal assembleNumber = BigDecimal.ZERO; BigDecimal assembleNumber = BigDecimal.ZERO;
try { try {
BigDecimal sum = depotItemService.findAssembleByType(subType, mType, ProjectId, MId, MonthTime, isPrev); BigDecimal sum = depotItemService.findAssembleByType(subType, mType, ProjectId, MId, MonthTime, isPrev);
...@@ -766,7 +766,7 @@ public class DepotItemController { ...@@ -766,7 +766,7 @@ public class DepotItemController {
* @param isPrev * @param isPrev
* @return * @return
*/ */
public BigDecimal sumPrice(String type, Integer ProjectId, Long MId, String MonthTime, Boolean isPrev) { public BigDecimal sumPrice(String type, Integer ProjectId, Long MId, String MonthTime, Boolean isPrev) throws Exception{
BigDecimal sumPrice = BigDecimal.ZERO; BigDecimal sumPrice = BigDecimal.ZERO;
try { try {
BigDecimal sum = depotItemService.findPriceByType(type, ProjectId, MId, MonthTime, isPrev); BigDecimal sum = depotItemService.findPriceByType(type, ProjectId, MId, MonthTime, isPrev);
...@@ -779,7 +779,7 @@ public class DepotItemController { ...@@ -779,7 +779,7 @@ public class DepotItemController {
return sumPrice; return sumPrice;
} }
public BigDecimal sumNumberBuyOrSale(String type, String subType, Long MId, String MonthTime) { public BigDecimal sumNumberBuyOrSale(String type, String subType, Long MId, String MonthTime)throws Exception {
BigDecimal sumNumber = BigDecimal.ZERO; BigDecimal sumNumber = BigDecimal.ZERO;
String sumType = "Number"; String sumType = "Number";
try { try {
...@@ -793,7 +793,7 @@ public class DepotItemController { ...@@ -793,7 +793,7 @@ public class DepotItemController {
return sumNumber; return sumNumber;
} }
public BigDecimal sumPriceBuyOrSale(String type, String subType, Long MId, String MonthTime) { public BigDecimal sumPriceBuyOrSale(String type, String subType, Long MId, String MonthTime)throws Exception {
BigDecimal sumPrice = BigDecimal.ZERO; BigDecimal sumPrice = BigDecimal.ZERO;
String sumType = "Price"; String sumType = "Price";
try { try {
......
...@@ -19,16 +19,16 @@ public class DepotItemComponent implements ICommonQuery { ...@@ -19,16 +19,16 @@ public class DepotItemComponent implements ICommonQuery {
private DepotItemService depotItemService; private DepotItemService depotItemService;
@Override @Override
public Object selectOne(String condition) { public Object selectOne(String condition)throws Exception {
return null; return null;
} }
@Override @Override
public List<?> select(Map<String, String> map) { public List<?> select(Map<String, String> map)throws Exception {
return getDepotItemList(map); return getDepotItemList(map);
} }
private List<?> getDepotItemList(Map<String, String> map) { private List<?> getDepotItemList(Map<String, String> map)throws Exception {
String search = map.get(Constants.SEARCH); String search = map.get(Constants.SEARCH);
String name = StringUtil.getInfo(search, "name"); String name = StringUtil.getInfo(search, "name");
Integer type = StringUtil.parseInteger(StringUtil.getInfo(search, "type")); Integer type = StringUtil.parseInteger(StringUtil.getInfo(search, "type"));
...@@ -38,7 +38,7 @@ public class DepotItemComponent implements ICommonQuery { ...@@ -38,7 +38,7 @@ public class DepotItemComponent implements ICommonQuery {
} }
@Override @Override
public Long counts(Map<String, String> map) { public Long counts(Map<String, String> map)throws Exception {
String search = map.get(Constants.SEARCH); String search = map.get(Constants.SEARCH);
String name = StringUtil.getInfo(search, "name"); String name = StringUtil.getInfo(search, "name");
Integer type = StringUtil.parseInteger(StringUtil.getInfo(search, "type")); Integer type = StringUtil.parseInteger(StringUtil.getInfo(search, "type"));
...@@ -47,27 +47,27 @@ public class DepotItemComponent implements ICommonQuery { ...@@ -47,27 +47,27 @@ public class DepotItemComponent implements ICommonQuery {
} }
@Override @Override
public int insert(String beanJson, HttpServletRequest request) { public int insert(String beanJson, HttpServletRequest request)throws Exception {
return depotItemService.insertDepotItem(beanJson, request); return depotItemService.insertDepotItem(beanJson, request);
} }
@Override @Override
public int update(String beanJson, Long id) { public int update(String beanJson, Long id)throws Exception {
return depotItemService.updateDepotItem(beanJson, id); return depotItemService.updateDepotItem(beanJson, id);
} }
@Override @Override
public int delete(Long id) { public int delete(Long id)throws Exception {
return depotItemService.deleteDepotItem(id); return depotItemService.deleteDepotItem(id);
} }
@Override @Override
public int batchDelete(String ids) { public int batchDelete(String ids)throws Exception {
return depotItemService.batchDeleteDepotItem(ids); return depotItemService.batchDeleteDepotItem(ids);
} }
@Override @Override
public int checkIsNameExist(Long id, String name) { public int checkIsNameExist(Long id, String name)throws Exception {
return depotItemService.checkIsNameExist(id, name); return depotItemService.checkIsNameExist(id, name);
} }
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment