|
|
@ -1,19 +1,23 @@
|
|
|
|
package com.dsic.gj_erp.controller.pgd;
|
|
|
|
package com.dsic.gj_erp.controller.pgd;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import cn.hutool.core.date.DateUtil;
|
|
|
|
import cn.hutool.core.util.StrUtil;
|
|
|
|
import cn.hutool.core.util.StrUtil;
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
|
import com.dsic.gj_erp.annotation.AuthFunction;
|
|
|
|
import com.dsic.gj_erp.annotation.AuthFunction;
|
|
|
|
import com.dsic.gj_erp.bean.ResultBean;
|
|
|
|
import com.dsic.gj_erp.bean.ResultBean;
|
|
|
|
|
|
|
|
import com.dsic.gj_erp.bean.jhgk.DmYdjh;
|
|
|
|
import com.dsic.gj_erp.bean.pgd.PgdQgjh;
|
|
|
|
import com.dsic.gj_erp.bean.pgd.PgdQgjh;
|
|
|
|
import com.dsic.gj_erp.exception.CustomException;
|
|
|
|
import com.dsic.gj_erp.exception.CustomException;
|
|
|
|
import com.dsic.gj_erp.service.pgd.PgdQgjhService;
|
|
|
|
import com.dsic.gj_erp.service.pgd.PgdQgjhService;
|
|
|
|
|
|
|
|
import com.dsic.gj_erp.service.zyjh.ZyjhService;
|
|
|
|
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.*;
|
|
|
|
|
|
|
|
|
|
|
|
import javax.servlet.http.HttpServletRequest;
|
|
|
|
import javax.servlet.http.HttpServletRequest;
|
|
|
|
import java.util.List;
|
|
|
|
import java.util.List;
|
|
|
|
import java.util.Map;
|
|
|
|
import java.util.Map;
|
|
|
|
|
|
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* <p>
|
|
|
|
* <p>
|
|
|
@ -27,10 +31,29 @@ import java.util.Map;
|
|
|
|
@RequestMapping("/pgdQgjh")
|
|
|
|
@RequestMapping("/pgdQgjh")
|
|
|
|
public class PgdQgjhController {
|
|
|
|
public class PgdQgjhController {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Autowired
|
|
|
|
@Autowired
|
|
|
|
PgdQgjhService pgdQgjhService;
|
|
|
|
PgdQgjhService pgdQgjhService;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Autowired
|
|
|
|
|
|
|
|
ZyjhService zyjhService;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@PostMapping("comLph")
|
|
|
|
|
|
|
|
@AuthFunction
|
|
|
|
|
|
|
|
public ResultBean comLph(HttpServletRequest req, @RequestBody List<DmYdjh> list) throws Exception, CustomException {
|
|
|
|
|
|
|
|
String yhdm = (String) req.getAttribute("yhdm");
|
|
|
|
|
|
|
|
String date= DateUtil.date().toString("yyyy/MM/dd");
|
|
|
|
|
|
|
|
List<DmYdjh> collect = list.stream().map(item -> {
|
|
|
|
|
|
|
|
DmYdjh dmYdjh = new DmYdjh();
|
|
|
|
|
|
|
|
dmYdjh.setId(item.getId());
|
|
|
|
|
|
|
|
dmYdjh.setLphqrry(yhdm);
|
|
|
|
|
|
|
|
dmYdjh.setLphqrrq(date);
|
|
|
|
|
|
|
|
return dmYdjh;
|
|
|
|
|
|
|
|
}).collect(Collectors.toList());
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
zyjhService.updateBatchById(collect);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return new ResultBean();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@PostMapping("/getQgPgd")
|
|
|
|
@PostMapping("/getQgPgd")
|
|
|
|