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

更改上传汇总单功能

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