|
|
|
@ -1,9 +1,20 @@
|
|
|
|
|
package com.dsic.gj_erp.controller.pgd;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
|
|
import cn.hutool.core.util.StrUtil;
|
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
|
|
import com.dsic.gj_erp.annotation.AuthFunction;
|
|
|
|
|
import com.dsic.gj_erp.bean.ResultBean;
|
|
|
|
|
import com.dsic.gj_erp.bean.pgd.PgdDmjh;
|
|
|
|
|
import com.dsic.gj_erp.bean.pgd.PgdDmjh;
|
|
|
|
|
import com.dsic.gj_erp.exception.CustomException;
|
|
|
|
|
import com.dsic.gj_erp.service.pgd.PgdDmjhService;
|
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
|
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
import javax.servlet.http.HttpServletRequest;
|
|
|
|
|
import java.util.List;
|
|
|
|
|
import java.util.Map;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* <p>
|
|
|
|
@ -17,5 +28,51 @@ import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
@RequestMapping("/pgdDmjh")
|
|
|
|
|
public class PgdDmjhController {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Autowired
|
|
|
|
|
PgdDmjhService pgdDmjhService;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@PostMapping("/getDmPgd")
|
|
|
|
|
@ResponseBody
|
|
|
|
|
public ResultBean getDmPgd(HttpServletRequest req, @RequestBody Map map) throws Exception, CustomException {
|
|
|
|
|
QueryWrapper<PgdDmjh> qw =new QueryWrapper<>();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
qw.eq(StrUtil.isNotEmpty((String)map.get("dcch")),"czbh",(String)map.get("dcch"));
|
|
|
|
|
qw.eq(StrUtil.isNotEmpty((String)map.get("pl")),"pl",(String)map.get("pl"));
|
|
|
|
|
qw.eq(StrUtil.isNotEmpty((String)map.get("fd")),"fd",(String)map.get("fd"));
|
|
|
|
|
qw.eq(StrUtil.isNotEmpty((String)map.get("zt")),"zt",(String)map.get("zt"));
|
|
|
|
|
qw.orderBy(true,true,"czbh","pl","fd");
|
|
|
|
|
return new ResultBean(pgdDmjhService.list(qw));
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@PostMapping("/saveDmPgdXd")
|
|
|
|
|
@ResponseBody
|
|
|
|
|
@AuthFunction
|
|
|
|
|
public ResultBean saveDmPgdXd(HttpServletRequest req, @RequestBody List<PgdDmjh> list) throws Exception, CustomException {
|
|
|
|
|
pgdDmjhService.saveDmPgdXd(list,req);
|
|
|
|
|
return new ResultBean();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@PostMapping("/saveDmPgdXdBack")
|
|
|
|
|
@ResponseBody
|
|
|
|
|
@AuthFunction
|
|
|
|
|
public ResultBean saveDmPgdXdBack(HttpServletRequest req, @RequestBody List<PgdDmjh>list) throws Exception, CustomException {
|
|
|
|
|
pgdDmjhService.saveDmPgdXdBack(list,req);
|
|
|
|
|
return new ResultBean();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@PostMapping("/saveDmPgdFk")
|
|
|
|
|
@ResponseBody
|
|
|
|
|
@AuthFunction
|
|
|
|
|
public ResultBean saveDmPgdFk(HttpServletRequest req, @RequestBody List<PgdDmjh>list) throws Exception, CustomException {
|
|
|
|
|
pgdDmjhService.saveDmPgdFk(list,req); ;
|
|
|
|
|
return new ResultBean();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|