Merge branch 'dev' of http://47.94.165.164:13000/geg-gas/geg-gas-pcitc into dev
This commit is contained in:
@ -29,9 +29,11 @@ import com.xjrsoft.module.datalog.service.DatalogService;
|
||||
import com.xjrsoft.module.datalog.vo.DataChangeLogVo;
|
||||
import com.xjrsoft.module.dayPlan.dto.LngPngDemandPageDto;
|
||||
import com.xjrsoft.module.dayPlan.dto.UpdateLngPngDemandDto;
|
||||
import com.xjrsoft.module.dayPlan.dto.UpdateLngPngDemandPurDto;
|
||||
import com.xjrsoft.module.dayPlan.entity.LngPngDemand;
|
||||
import com.xjrsoft.module.dayPlan.service.IDemandService;
|
||||
import com.xjrsoft.module.dayPlan.vo.LngPngDemandPageVo;
|
||||
import com.xjrsoft.module.dayPlan.vo.LngPngDemandPurVo;
|
||||
import com.xjrsoft.module.dayPlan.vo.LngPngDemandVo;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
@ -105,7 +107,7 @@ public class DemandController {
|
||||
}
|
||||
|
||||
@PutMapping
|
||||
@ApiOperation(value = "修改LngPngDemand")
|
||||
@ApiOperation(value = "编辑LngPngDemand")
|
||||
@SaCheckPermission("demand:edit")
|
||||
public R update(@Valid @RequestBody UpdateLngPngDemandDto dto){
|
||||
return R.ok(dataService.updateById(dto,new DataOperationListener<UpdateLngPngDemandDto>() {
|
||||
@ -122,6 +124,74 @@ public class DemandController {
|
||||
}
|
||||
}));
|
||||
}
|
||||
|
||||
@PostMapping(value="/toChange")
|
||||
@ApiOperation(value = "变更LngPngDemand")
|
||||
//@SaCheckPermission("demand:toChange")
|
||||
public R toChange(@Valid @RequestParam Long id){
|
||||
LngPngDemand lngPngDemand = demandService.getByIdDeep(id);
|
||||
if (lngPngDemand == null) {
|
||||
return R.error("找不到此数据!");
|
||||
}
|
||||
LngPngDemandVo res = BeanUtil.toBean(lngPngDemand, LngPngDemandVo.class);
|
||||
res.setId(null);
|
||||
res.setAlterSign("U");
|
||||
res.setApproCode("WTJ");
|
||||
res.setLastVerSign("Y");
|
||||
res.setTimeSubmit(null);
|
||||
res.setReply(null);
|
||||
res.setQtySalesGj(null);
|
||||
res.setQtySalesM3(null);
|
||||
res.setRateM3Gj(null);
|
||||
res.setQtyContractGj(null);
|
||||
res.setQtyContractM3(null);
|
||||
res.setQtyPlanGj(null);
|
||||
res.setQtyPlanM3(null);
|
||||
res.setOrgId(id);
|
||||
if(res.getLngPngDemandPurList() != null) {
|
||||
for(LngPngDemandPurVo pdp: res.getLngPngDemandPurList()) {
|
||||
pdp.setId(null);
|
||||
pdp.setDemandId(null);
|
||||
pdp.setQtySalesGj(null);
|
||||
pdp.setQtySalesM3(null);
|
||||
pdp.setAddSign("N");
|
||||
}
|
||||
}
|
||||
return R.ok(res);
|
||||
}
|
||||
|
||||
@PostMapping(value="/cancel")
|
||||
@ApiOperation(value = "取消LngPngDemand")
|
||||
//@SaCheckPermission("demand:cancel")
|
||||
public R cancel(@Valid @RequestParam Long id){
|
||||
LngPngDemand lngPngDemand = demandService.getByIdDeep(id);
|
||||
if (lngPngDemand == null) {
|
||||
return R.error("找不到此数据!");
|
||||
}
|
||||
UpdateLngPngDemandDto temp = BeanUtil.toBean(lngPngDemand, UpdateLngPngDemandDto.class);
|
||||
temp.setId(null);
|
||||
temp.setAlterSign("D");
|
||||
temp.setApproCode("WTJ");
|
||||
temp.setTimeSubmit(null);
|
||||
temp.setReply(null);
|
||||
|
||||
if(temp.getLngPngDemandPurList() != null) {
|
||||
for(UpdateLngPngDemandPurDto pdp: temp.getLngPngDemandPurList()) {
|
||||
pdp.setId(null);
|
||||
pdp.setDemandId(null);
|
||||
pdp.setAddSign("N");
|
||||
}
|
||||
}
|
||||
return add(temp);
|
||||
}
|
||||
|
||||
@GetMapping(value="/compare")
|
||||
@ApiOperation(value = "对比LngPngDemand")
|
||||
//@SaCheckPermission("demand:toChange")
|
||||
public R compare(@Valid @RequestParam Long id){
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
@DeleteMapping
|
||||
@ApiOperation(value = "删除")
|
||||
|
||||
@ -3,6 +3,7 @@ package com.xjrsoft.module.dayPlan.controller;
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import javax.validation.Valid;
|
||||
@ -22,14 +23,19 @@ import com.alibaba.excel.EasyExcel;
|
||||
import com.alibaba.excel.support.ExcelTypeEnum;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.pictc.datalog.DataOperationContent;
|
||||
import com.pictc.datalog.DataOperationListener;
|
||||
import com.pictc.datalog.DefaultDataOperationListener;
|
||||
import com.xjrsoft.common.model.result.R;
|
||||
import com.xjrsoft.common.page.ConventPage;
|
||||
import com.xjrsoft.common.page.PageOutput;
|
||||
import com.xjrsoft.common.utils.ExcelUtil;
|
||||
import com.xjrsoft.common.utils.SecureUtil;
|
||||
import com.xjrsoft.common.utils.VoToColumnUtil;
|
||||
import com.xjrsoft.module.datalog.service.DatalogService;
|
||||
import com.xjrsoft.module.datalog.vo.DataChangeLogVo;
|
||||
import com.xjrsoft.module.dayPlan.dto.LngPngMeasureSalesPurPageDto;
|
||||
import com.xjrsoft.module.dayPlan.dto.UpdateLngPngDemandDto;
|
||||
import com.xjrsoft.module.dayPlan.dto.UpdateLngPngMeasureSalesPurDto;
|
||||
import com.xjrsoft.module.dayPlan.entity.LngPngMeasureSalesPur;
|
||||
import com.xjrsoft.module.dayPlan.service.IPngMeasureSalesPurService;
|
||||
@ -106,17 +112,83 @@ public class PngMeasureSalesPurController {
|
||||
|
||||
@PostMapping
|
||||
@ApiOperation(value = "保存LngPngMeasureSalesPur")
|
||||
@SaCheckPermission("pngMeasureSalesPur:add")
|
||||
public R add(@Valid @RequestBody UpdateLngPngMeasureSalesPurDto dto){
|
||||
@SaCheckPermission("pngMeasureSalesPur:save")
|
||||
public R save(@Valid @RequestBody UpdateLngPngMeasureSalesPurDto dto){
|
||||
UpdateLngPngMeasureSalesPurDto res = null;
|
||||
if(dto.getId() == null) {
|
||||
res = dataService.insert(dto);
|
||||
}else {
|
||||
dataService.updateById(dto);
|
||||
res = dto;
|
||||
}
|
||||
res = dataService.insert(dto);
|
||||
return R.ok(res.getId());
|
||||
}
|
||||
|
||||
@PutMapping
|
||||
@ApiOperation(value = "保存并确认LngPngMeasureSalesPur")
|
||||
@SaCheckPermission("pngMeasureSalesPur:submit")
|
||||
public R submit(@Valid @RequestBody List<UpdateLngPngMeasureSalesPurDto> dtoList){
|
||||
for(UpdateLngPngMeasureSalesPurDto dto: dtoList) {
|
||||
dto.setCfmCuUserId(SecureUtil.getCurrentUserId());
|
||||
dto.setCfmCuUserTime(new Date());
|
||||
}
|
||||
return R.ok(dataService.insertBatch(dtoList,new DataOperationListener<UpdateLngPngMeasureSalesPurDto>() {
|
||||
|
||||
@Override
|
||||
public UpdateLngPngMeasureSalesPurDto before(DataOperationContent<UpdateLngPngMeasureSalesPurDto> content) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public UpdateLngPngMeasureSalesPurDto after(DataOperationContent<UpdateLngPngMeasureSalesPurDto> content) {
|
||||
|
||||
return null;
|
||||
}
|
||||
}));
|
||||
}
|
||||
|
||||
@PostMapping(value = "/cancel")
|
||||
@ApiOperation(value = "取消确认LngPngMeasureSalesPur")
|
||||
@SaCheckPermission("pngMeasureSalesPur:cancel")
|
||||
public R cancel(@Valid @RequestBody List<UpdateLngPngMeasureSalesPurDto> dtoList){
|
||||
for(UpdateLngPngMeasureSalesPurDto dto: dtoList) {
|
||||
dto.setCfmCuUserId(null);
|
||||
dto.setCfmCuUserTime(null);
|
||||
dto.setCfmEmpId(null);
|
||||
dto.setCfmEmpTime(null);
|
||||
}
|
||||
return R.ok(dataService.insertBatch(dtoList,new DataOperationListener<UpdateLngPngMeasureSalesPurDto>() {
|
||||
|
||||
@Override
|
||||
public UpdateLngPngMeasureSalesPurDto before(DataOperationContent<UpdateLngPngMeasureSalesPurDto> content) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public UpdateLngPngMeasureSalesPurDto after(DataOperationContent<UpdateLngPngMeasureSalesPurDto> content) {
|
||||
|
||||
return null;
|
||||
}
|
||||
}));
|
||||
}
|
||||
|
||||
@PostMapping(value = "/reject")
|
||||
@ApiOperation(value = "驳回LngPngMeasureSalesPur")
|
||||
@SaCheckPermission("pngMeasureSalesPur:reject")
|
||||
public R reject(@Valid @RequestBody List<UpdateLngPngMeasureSalesPurDto> dtoList){
|
||||
for(UpdateLngPngMeasureSalesPurDto dto: dtoList) {
|
||||
dto.setCfmEmpId(null);
|
||||
dto.setCfmEmpTime(null);
|
||||
}
|
||||
return R.ok(dataService.insertBatch(dtoList,new DataOperationListener<UpdateLngPngMeasureSalesPurDto>() {
|
||||
|
||||
@Override
|
||||
public UpdateLngPngMeasureSalesPurDto before(DataOperationContent<UpdateLngPngMeasureSalesPurDto> content) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public UpdateLngPngMeasureSalesPurDto after(DataOperationContent<UpdateLngPngMeasureSalesPurDto> content) {
|
||||
|
||||
return null;
|
||||
}
|
||||
}));
|
||||
}
|
||||
|
||||
|
||||
@DeleteMapping
|
||||
|
||||
Reference in New Issue
Block a user