提交 c0ee413c authored 作者: Wangjiajie's avatar Wangjiajie

更改上传汇总单功能

上级 02a80fcd
package org.jeecg.modules.iost.basedata.controller; package org.jeecg.modules.iost.basedata.controller;
import java.io.UnsupportedEncodingException;
import java.io.IOException; import java.io.IOException;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.net.URLDecoder;
import java.text.DecimalFormat;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Arrays; import java.util.Arrays;
import java.util.Date; import java.util.Date;
import java.util.HashMap; import java.util.HashMap;
import java.util.HashSet;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.stream.Collectors; import java.util.stream.Collectors;
...@@ -17,40 +13,22 @@ import java.util.stream.Collectors; ...@@ -17,40 +13,22 @@ import java.util.stream.Collectors;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import org.jeecg.modules.iost.basedata.entity.*;
import org.jeecg.modules.iost.basedata.service.*;
import org.jeecgframework.poi.excel.ExcelImportUtil; import org.jeecgframework.poi.excel.ExcelImportUtil;
import org.jeecgframework.poi.excel.def.NormalExcelConstants; import org.jeecgframework.poi.excel.def.NormalExcelConstants;
import org.jeecgframework.poi.excel.entity.ExportParams; import org.jeecgframework.poi.excel.entity.ExportParams;
import org.jeecgframework.poi.excel.entity.ImportParams; import org.jeecgframework.poi.excel.entity.ImportParams;
import org.jeecgframework.poi.excel.view.JeecgEntityExcelView; import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
import org.jeecg.common.system.vo.LoginUser; import org.jeecg.common.system.vo.LoginUser;
import org.apache.ibatis.ognl.IntHashMap;
import org.apache.shiro.SecurityUtils; import org.apache.shiro.SecurityUtils;
import org.apache.shiro.authz.annotation.RequiresPermissions; import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.jeecg.common.api.vo.Result; import org.jeecg.common.api.vo.Result;
import org.jeecg.common.system.query.QueryGenerator; import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.common.util.FillRuleUtil;
import org.jeecg.common.util.oConvertUtils; import org.jeecg.common.util.oConvertUtils;
import org.jeecg.modules.iost.basedata.entity.IostSummarySheetList;
import org.jeecg.modules.iost.basedata.entity.IostCustomer;
import org.jeecg.modules.iost.basedata.entity.IostCustomerlist;
import org.jeecg.modules.iost.basedata.entity.IostDeliveryNote;
import org.jeecg.modules.iost.basedata.entity.IostDeliveryNoteList;
import org.jeecg.modules.iost.basedata.entity.IostDeliveryRecord;
import org.jeecg.modules.iost.basedata.entity.IostDeliveryRecordList;
import org.jeecg.modules.iost.basedata.entity.IostReceivingNote;
import org.jeecg.modules.iost.basedata.entity.IostReceivingNoteList;
import org.jeecg.modules.iost.basedata.entity.IostSummarySheet;
import org.jeecg.modules.iost.basedata.vo.IostDeliveryNotePage; import org.jeecg.modules.iost.basedata.vo.IostDeliveryNotePage;
import org.jeecg.modules.iost.basedata.vo.IostReceivingNotePage; import org.jeecg.modules.iost.basedata.vo.IostReceivingNotePage;
import org.jeecg.modules.iost.basedata.vo.IostSummarySheetPage; import org.jeecg.modules.iost.basedata.vo.IostSummarySheetPage;
import org.jeecg.modules.iost.basedata.service.IIostSummarySheetService;
import org.jeecg.modules.iost.basedata.service.IIostCustomerService;
import org.jeecg.modules.iost.basedata.service.IIostCustomerlistService;
import org.jeecg.modules.iost.basedata.service.IIostDeliveryNoteService;
import org.jeecg.modules.iost.basedata.service.IIostDeliveryRecordListService;
import org.jeecg.modules.iost.basedata.service.IIostDeliveryRecordService;
import org.jeecg.modules.iost.basedata.service.IIostReceivingNoteService;
import org.jeecg.modules.iost.basedata.service.IIostSummarySheetListService;
import org.springframework.beans.BeanUtils; import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
...@@ -63,17 +41,13 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; ...@@ -63,17 +41,13 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import cn.hutool.core.date.DateTime;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import org.jeecg.common.aspect.annotation.AutoLog; import org.jeecg.common.aspect.annotation.AutoLog;
import org.jeecg.common.constant.FillRuleConstant;
/** /**
* @Description: 汇总单 * @Description: 汇总单
* @Author: jeecg-boot * @Author: jeecg-boot
* @Date: 2020-12-22 * @Date: 2020-12-22
...@@ -101,6 +75,8 @@ public class IostSummarySheetController { ...@@ -101,6 +75,8 @@ public class IostSummarySheetController {
private IIostCustomerService iostCustomerService; private IIostCustomerService iostCustomerService;
@Autowired @Autowired
private IIostCustomerlistService iostCustomerlistService; private IIostCustomerlistService iostCustomerlistService;
@Autowired
private IIostDeliveryRecordPicService iostDeliveryRecordPicService;
/** /**
* 分页列表查询 * 分页列表查询
...@@ -540,6 +516,29 @@ public class IostSummarySheetController { ...@@ -540,6 +516,29 @@ public class IostSummarySheetController {
iostReceivingNoteListList.add(addSumRow(iostReceivingNoteListList)); iostReceivingNoteListList.add(addSumRow(iostReceivingNoteListList));
return Result.OK(iostReceivingNoteListList); return Result.OK(iostReceivingNoteListList);
} }
/**
* 编辑
*
* @param iostDeliveryRecordPic
* @return
*/
@AutoLog(value = "上传汇总单-编辑")
@ApiOperation(value="上传汇总单-编辑", notes="上传汇总单-编辑")
@PutMapping(value = "/updateSummarySheetList")
public Result<?> edit(@RequestBody IostDeliveryRecordPic iostDeliveryRecordPic) {
IostDeliveryRecordPic curPic = iostDeliveryRecordPicService.getById(iostDeliveryRecordPic.getId());
if(curPic!=null){
iostDeliveryRecordPicService.updateById(iostDeliveryRecordPic);
}else{
iostDeliveryRecordPicService.save(iostDeliveryRecordPic);
}
IostSummarySheetList sheetList = iostSummarySheetListService.getById(iostDeliveryRecordPic.getId());
sheetList.setDeliverStatus("2");
iostSummarySheetListService.updateById(sheetList);
return Result.OK("编辑成功!");
}
/*** /***
* 增加统计行 * 增加统计行
* @param iostSummarySheetLists * @param iostSummarySheetLists
......
...@@ -80,7 +80,7 @@ public class IostSummarySheetList implements Serializable { ...@@ -80,7 +80,7 @@ public class IostSummarySheetList implements Serializable {
@ApiModelProperty(value = "送货状态") @ApiModelProperty(value = "送货状态")
private java.lang.String deliverStatus; private java.lang.String deliverStatus;
public void setDeliverStatus(String deliverStatus) { /*public void setDeliverStatus(String deliverStatus) {
this.deliverStatus=deliverStatus; this.deliverStatus=deliverStatus;
switch (deliverStatus){ switch (deliverStatus){
case "1": case "1":
...@@ -90,7 +90,7 @@ public class IostSummarySheetList implements Serializable { ...@@ -90,7 +90,7 @@ public class IostSummarySheetList implements Serializable {
this.deliverStatus = "已送货"; this.deliverStatus = "已送货";
break; break;
} }
} }*/
/**汇总单id*/ /**汇总单id*/
@ApiModelProperty(value = "汇总单id") @ApiModelProperty(value = "汇总单id")
......
...@@ -13,4 +13,5 @@ import java.util.List; ...@@ -13,4 +13,5 @@ import java.util.List;
public interface IIostSummarySheetListService extends IService<IostSummarySheetList> { public interface IIostSummarySheetListService extends IService<IostSummarySheetList> {
public List<IostSummarySheetList> selectByMainId(String mainId); public List<IostSummarySheetList> selectByMainId(String mainId);
} }
...@@ -20,6 +20,7 @@ public class IostSummarySheetListServiceImpl extends ServiceImpl<IostSummaryShee ...@@ -20,6 +20,7 @@ public class IostSummarySheetListServiceImpl extends ServiceImpl<IostSummaryShee
@Autowired @Autowired
private IostSummarySheetListMapper iostSummarySheetListMapper; private IostSummarySheetListMapper iostSummarySheetListMapper;
@Override @Override
public List<IostSummarySheetList> selectByMainId(String mainId) { public List<IostSummarySheetList> selectByMainId(String mainId) {
return iostSummarySheetListMapper.selectByMainId(mainId); return iostSummarySheetListMapper.selectByMainId(mainId);
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论