新增业务日期

product
杨世强 1 year ago
parent 63f73541b5
commit c26ff37754

@ -3,6 +3,9 @@ package jnpf.accounting.mapper;
import jnpf.accounting.entity.AccountingEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
*
@ -13,5 +16,6 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
* 2023-06-19
*/
public interface AccountingMapper extends BaseMapper<AccountingEntity> {
List<AccountingEntity> queryAccounting(@Param("businessDate") String businessDate);
}

@ -8,6 +8,8 @@ import cn.afterturn.easypoi.excel.entity.enmus.ExcelType;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import jnpf.accounting.entity.AccountingEntity;
import jnpf.accounting.mapper.AccountingMapper;
import jnpf.base.ActionResult;
import jnpf.base.vo.PageListVO;
import jnpf.base.vo.PaginationVO;
@ -51,6 +53,7 @@ import jnpf.arinvoices.service.Arinvoices_item0Service;
import org.springframework.web.bind.annotation.*;
import org.springframework.beans.factory.annotation.Autowired;
import javax.annotation.Resource;
import javax.validation.Valid;
import java.io.File;
import java.io.FileOutputStream;
@ -58,6 +61,7 @@ import java.io.IOException;
import jnpf.util.GeneraterSwapUtil;
import java.math.BigDecimal;
import java.text.SimpleDateFormat;
import java.util.*;
import java.util.stream.Collectors;
@ -108,6 +112,9 @@ public class ArinvoicesController {
@Autowired
private CustomerService customerService;
@Resource
private AccountingMapper accountingMapper;
/**
@ -150,6 +157,16 @@ public class ArinvoicesController {
@PostMapping
@Transactional
public ActionResult create(@RequestBody @Valid ArinvoicesCrForm arinvoicesCrForm) throws DataException {
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");
String date = simpleDateFormat.format(arinvoicesCrForm.getBusinessDate());
List<AccountingEntity> list = accountingMapper.queryAccounting(date);
if (list!=null && list.size()>0){
if (list.get(0).getStatus().equals("1")){
return ActionResult.fail("账期已关闭,无法在此区间开展业务");
}
}else{
return ActionResult.fail("账期不存在,无法在此区间开展业务");
}
String mainId =RandomUtil.uuId();
UserInfo userInfo=userProvider.get();
arinvoicesCrForm.setCreatorUserName(userInfo.getUserId());
@ -489,6 +506,16 @@ public class ArinvoicesController {
@PutMapping("/{id}")
@Transactional
public ActionResult update(@PathVariable("id") String id,@RequestBody @Valid ArinvoicesUpForm arinvoicesUpForm) throws DataException {
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");
String date = simpleDateFormat.format(arinvoicesUpForm.getBusinessDate());
List<AccountingEntity> list = accountingMapper.queryAccounting(date);
if (list!=null && list.size()>0){
if (list.get(0).getStatus().equals("1")){
return ActionResult.fail("账期已关闭,无法在此区间开展业务");
}
}else{
return ActionResult.fail("账期不存在,无法在此区间开展业务");
}
if (StringUtils.isNotEmpty(arinvoicesUpForm.getSalesOrderId())){
SaleorderitemEntity saleorderitemEntity = saleorderitemService.getById(arinvoicesUpForm.getSalesOrderId());
if (StringUtils.isNotEmpty(saleorderitemEntity.getStatus())){

@ -9,6 +9,8 @@ import cn.afterturn.easypoi.excel.entity.params.ExcelExportEntity;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import jnpf.accounting.entity.AccountingEntity;
import jnpf.accounting.mapper.AccountingMapper;
import jnpf.base.ActionResult;
import jnpf.base.UserInfo;
import jnpf.base.vo.DownloadVO;
@ -45,11 +47,13 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import javax.validation.Valid;
import java.io.FileOutputStream;
import java.io.IOException;
import java.math.BigDecimal;
import java.math.RoundingMode;
import java.text.SimpleDateFormat;
import java.util.*;
import java.util.stream.Collectors;
import org.springframework.util.CollectionUtils;
@ -94,6 +98,9 @@ public class CollectionController {
private ContractFileService contractFileService;
@Autowired
private CustomerService customerService;
@Resource
private AccountingMapper accountingMapper;
/**
*
*
@ -292,6 +299,16 @@ public class CollectionController {
@PostMapping
@Transactional
public ActionResult create(@RequestBody @Valid CollectionCrForm collectionCrForm) throws DataException {
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");
String date = simpleDateFormat.format(collectionCrForm.getBusinessDate());
List<AccountingEntity> list = accountingMapper.queryAccounting(date);
if (list!=null && list.size()>0){
if (list.get(0).getStatus().equals("1")){
return ActionResult.fail("账期已关闭,无法在此区间开展业务");
}
}else{
return ActionResult.fail("账期不存在,无法在此区间开展业务");
}
List<Collection_item0Entity> Collection_item0List = JsonUtil.getJsonToList(collectionCrForm.getCollection_item0List(), Collection_item0Entity.class);
if (Collection_item0List != null && Collection_item0List.size() > 0) {
for (Collection_item0Entity collectionItem0Entity : Collection_item0List) {
@ -655,6 +672,16 @@ public class CollectionController {
@PutMapping("/{id}")
@Transactional
public ActionResult update(@PathVariable("id") String id,@RequestBody @Valid CollectionUpForm collectionUpForm) throws DataException {
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");
String date = simpleDateFormat.format(collectionUpForm.getBusinessDate());
List<AccountingEntity> list = accountingMapper.queryAccounting(date);
if (list!=null && list.size()>0){
if (list.get(0).getStatus().equals("1")){
return ActionResult.fail("账期已关闭,无法在此区间开展业务");
}
}else{
return ActionResult.fail("账期不存在,无法在此区间开展业务");
}
UserInfo userInfo=userProvider.get();
CollectionEntity entity= collectionService.getInfo(id);
if(entity!=null){

@ -82,4 +82,8 @@ public class CollectionCrForm {
@JsonProperty("collection_item0List")
private List<Collection_item0Model> collection_item0List;
/** 业务日期 **/
@JsonProperty("businessDate")
private Long businessDate;
}

@ -86,4 +86,8 @@ public class CollectionInfoVO{
@JsonProperty("contractNm")
private String contractNm;
/** 业务日期 **/
@JsonProperty("businessDate")
private Long businessDate;
}

@ -99,5 +99,9 @@ public class CollectionListVO{
@TableField(exist = false)
private String customerNm;
/** 业务日期 **/
@JsonProperty("businessDate")
private Long businessDate;
}

@ -8,6 +8,8 @@ import cn.afterturn.easypoi.excel.entity.enmus.ExcelType;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import jnpf.accounting.entity.AccountingEntity;
import jnpf.accounting.mapper.AccountingMapper;
import jnpf.base.ActionResult;
import jnpf.base.vo.PageListVO;
import jnpf.base.vo.PaginationVO;
@ -51,6 +53,8 @@ import jnpf.invoices.service.InvoicesItem0Service;
import org.springframework.web.bind.annotation.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.multipart.MultipartFile;
import javax.annotation.Resource;
import javax.validation.Valid;
import java.io.File;
import java.io.FileOutputStream;
@ -58,6 +62,7 @@ import java.io.IOException;
import jnpf.util.GeneraterSwapUtil;
import java.math.BigDecimal;
import java.text.SimpleDateFormat;
import java.util.*;
import java.util.stream.Collectors;
@ -108,6 +113,9 @@ public class InvoicesController {
private SupplierService supplierService;
@Autowired
private Purchaseorder_item0Service purchaseorder_item0Service;
@Resource
private AccountingMapper accountingMapper;
/**
*
*
@ -148,6 +156,16 @@ public class InvoicesController {
@PostMapping
@Transactional
public ActionResult create(@RequestBody @Valid InvoicesCrForm invoicesCrForm) throws DataException {
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");
String date = simpleDateFormat.format(invoicesCrForm.getBusinessDate());
List<AccountingEntity> list = accountingMapper.queryAccounting(date);
if (list!=null && list.size()>0){
if (list.get(0).getStatus().equals("1")){
return ActionResult.fail("账期已关闭,无法在此区间开展业务");
}
}else{
return ActionResult.fail("账期不存在,无法在此区间开展业务");
}
String mainId = RandomUtil.uuId();
UserInfo userInfo = userProvider.get();
//invoicesCrForm.setDocumentNo(generaterSwapUtil.getBillNumber("yffp", false));
@ -495,6 +513,16 @@ public class InvoicesController {
@PutMapping("/{id}")
@Transactional
public ActionResult update(@PathVariable("id") String id,@RequestBody @Valid InvoicesUpForm invoicesUpForm) throws DataException {
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");
String date = simpleDateFormat.format(invoicesUpForm.getBusinessDate());
List<AccountingEntity> list = accountingMapper.queryAccounting(date);
if (list!=null && list.size()>0){
if (list.get(0).getStatus().equals("1")){
return ActionResult.fail("账期已关闭,无法在此区间开展业务");
}
}else{
return ActionResult.fail("账期不存在,无法在此区间开展业务");
}
if (StringUtils.isNotEmpty(invoicesUpForm.getSupplierId())){
SupplierEntity supplierEntity = supplierService.getById(invoicesUpForm.getSupplierId());
if (ObjectUtil.isNotEmpty(supplierEntity) && StringUtils.isNotEmpty(supplierEntity.getPayType())){

@ -9,6 +9,8 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import jdk.nashorn.internal.ir.IfNode;
import jnpf.accounting.entity.AccountingEntity;
import jnpf.accounting.mapper.AccountingMapper;
import jnpf.base.ActionResult;
import jnpf.base.vo.PageListVO;
import jnpf.base.vo.PaginationVO;
@ -61,6 +63,8 @@ import jnpf.payment.service.Payment_item0Service;
import org.springframework.web.bind.annotation.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.multipart.MultipartFile;
import javax.annotation.Resource;
import javax.validation.Valid;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
@ -68,6 +72,7 @@ import java.io.IOException;
import jnpf.util.GeneraterSwapUtil;
import java.math.BigDecimal;
import java.text.SimpleDateFormat;
import java.util.*;
import java.util.stream.Collectors;
@ -119,6 +124,9 @@ public class PaymentController {
@Autowired
private SupplierService supplierService;
@Resource
private AccountingMapper accountingMapper;
@PostMapping("/submitprice")
@Transactional
public ActionResult submitprice(@RequestBody PaymentListVO paymentListVO) {
@ -262,6 +270,16 @@ public class PaymentController {
@PostMapping
@Transactional
public ActionResult create(@RequestBody @Valid PaymentCrForm paymentCrForm) throws DataException {
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");
String date = simpleDateFormat.format(paymentCrForm.getBusinessdate());
List<AccountingEntity> list1 = accountingMapper.queryAccounting(date);
if (list1!=null && list1.size()>0){
if (list1.get(0).getStatus().equals("1")){
return ActionResult.fail("账期已关闭,无法在此区间开展业务");
}
}else{
return ActionResult.fail("账期不存在,无法在此区间开展业务");
}
String mainId =RandomUtil.uuId();
UserInfo userInfo=userProvider.get();
//paymentCrForm.setDocumentno(generaterSwapUtil.getBillNumber("payment", false));
@ -579,6 +597,16 @@ public class PaymentController {
@PutMapping("/{id}")
@Transactional
public ActionResult update(@PathVariable("id") String id,@RequestBody @Valid PaymentUpForm paymentUpForm) throws DataException {
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");
String date = simpleDateFormat.format(paymentUpForm.getBusinessdate());
List<AccountingEntity> list1 = accountingMapper.queryAccounting(date);
if (list1!=null && list1.size()>0){
if (list1.get(0).getStatus().equals("1")){
return ActionResult.fail("账期已关闭,无法在此区间开展业务");
}
}else{
return ActionResult.fail("账期不存在,无法在此区间开展业务");
}
UserInfo userInfo=userProvider.get();
PaymentEntity entity= paymentService.getInfo(id);
if (entity.getStatus().equals("2")){

@ -10,6 +10,8 @@ import cn.hutool.core.util.ZipUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import jnpf.accounting.entity.AccountingEntity;
import jnpf.accounting.mapper.AccountingMapper;
import jnpf.arinvoices.entity.ArinvoicesEntity;
import jnpf.arinvoices.entity.Arinvoices_item1Entity;
import jnpf.base.ActionResult;
@ -82,6 +84,7 @@ import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import javax.annotation.Resource;
import javax.validation.Valid;
import java.io.File;
import java.io.FileOutputStream;
@ -90,6 +93,7 @@ import java.io.InputStream;
import java.math.BigDecimal;
import java.nio.charset.Charset;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.*;
import java.util.stream.Collectors;
@ -168,6 +172,9 @@ public class PurchaseorderController {
@Autowired
private InvoicesItem1Service invoicesItem1Service;
@Resource
private AccountingMapper accountingMapper;
/**
*
*
@ -279,6 +286,16 @@ public class PurchaseorderController {
@PostMapping
@Transactional
public ActionResult create(@RequestBody @Valid PurchaseorderCrForm purchaseorderCrForm) throws DataException {
SimpleDateFormat simpleDateFormat = new SimpleDateFormat();
String date = simpleDateFormat.format(purchaseorderCrForm.getBusinessDate());
List<AccountingEntity> list = accountingMapper.queryAccounting(date);
if (list!=null && list.size()>0){
if (list.get(0).getStatus().equals("1")){
return ActionResult.fail("账期已关闭,无法在此区间开展业务");
}
}else{
return ActionResult.fail("账期不存在,无法在此区间开展业务");
}
String mainId = RandomUtil.uuId();
UserInfo userInfo = userProvider.get();
//purchaseorderCrForm.setDocumentNo(generaterSwapUtil.getBillNumber("cgdj", false));
@ -366,6 +383,16 @@ public class PurchaseorderController {
@ApiOperation("上传文件")
@PostMapping("/Uploader")
public ActionResult Uploader() throws Exception {
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");
String date = simpleDateFormat.format(new Date());
List<AccountingEntity> list1 = accountingMapper.queryAccounting(date);
if (list1!=null && list1.size()>0){
if (list1.get(0).getStatus().equals("1")){
return ActionResult.fail("账期已关闭,无法在此区间开展业务");
}
}else{
return ActionResult.fail("账期不存在,无法在此区间开展业务");
}
List<MultipartFile> list = UpUtil.getFileAll();
MultipartFile file = list.get(0);
if (file.getOriginalFilename().endsWith(".zip")) {
@ -972,6 +999,19 @@ public class PurchaseorderController {
@PutMapping("/{id}")
@Transactional
public ActionResult update(@PathVariable("id") String id, @RequestBody @Valid PurchaseorderUpForm purchaseorderUpForm) throws DataException {
SimpleDateFormat simpleDateFormat = new SimpleDateFormat();
String date = "";
if (purchaseorderUpForm.getBusinessDate() != null) {
date = simpleDateFormat.format(purchaseorderUpForm.getBusinessDate());
}
List<AccountingEntity> list = accountingMapper.queryAccounting(date);
if (list!=null && list.size()>0){
if (list.get(0).getStatus().equals("1")){
return ActionResult.fail("账期已关闭,无法在此区间开展业务");
}
}else{
return ActionResult.fail("账期不存在,无法在此区间开展业务");
}
UserInfo userInfo = userProvider.get();
PurchaseorderitemEntity entity = purchaseorderitemService.getInfo(id);
if (!entity.getStatus().equals("0")) {

@ -158,6 +158,10 @@ public class PurchaseorderitemEntity {
@TableField("PAYMENT_TIME")
private Integer paymentTime;
@TableField("BUSINESS_DATE")
private Date businessDate;
@TableField(exist = false)
private List<PoundlistEntity> poundlistEntityList;
@TableField(exist = false)

@ -2,6 +2,7 @@
package jnpf.purchaseorder.model.purchaseorder;
import com.baomidou.mybatisplus.annotation.TableField;
import jnpf.payment.model.payment.PaymentListVO;
import jnpf.purchaseback.entity.PurchasebackEntity;
import jnpf.purchaseorder.model.purchaseorder.Purchaseorder_item0Model;
@ -135,5 +136,8 @@ public class PurchaseorderCrForm {
@JsonProperty("collectionitemList")
private List<CollectionitemModel> collectionitemList;
@JsonProperty("businessDate")
private Long businessDate;
}

@ -3,6 +3,7 @@
package jnpf.purchaseorder.model.purchaseorder;
import com.baomidou.mybatisplus.annotation.TableField;
import jnpf.payment.model.payment.PaymentListVO;
import jnpf.paymentdoc.entity.PaymentdocEntity;
@ -186,4 +187,7 @@ public class PurchaseorderInfoVO{
@JsonProperty("PaymentdocItem0Entity")
private PaymentdocItem0Entity paymentdocItem0EntityList;
@JsonProperty("businessDate")
private Long businessDate;
}

@ -141,4 +141,7 @@ public class PurchaseorderListVO{
@JsonProperty("poundlistEntityList")
private List<PoundlistEntity> poundlistEntityList;
@JsonProperty("businessDate")
private Long businessDate;
}

@ -144,4 +144,6 @@ public class PurchaseorderUpForm{
@JsonProperty("collectionitemList")
private List<CollectionitemModel> collectionitemList;
@JsonProperty("businessDate")
private Long businessDate;
}

@ -8,6 +8,8 @@ import cn.afterturn.easypoi.excel.entity.enmus.ExcelType;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import jnpf.accounting.entity.AccountingEntity;
import jnpf.accounting.mapper.AccountingMapper;
import jnpf.base.ActionResult;
import jnpf.base.vo.PageListVO;
import jnpf.base.vo.PaginationVO;
@ -58,11 +60,15 @@ import jnpf.receiptin.service.Receiptin_item0Service;
import org.springframework.web.bind.annotation.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.multipart.MultipartFile;
import javax.annotation.Resource;
import javax.validation.Valid;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import jnpf.util.GeneraterSwapUtil;
import java.text.SimpleDateFormat;
import java.util.*;
import java.util.stream.Collectors;
@ -118,6 +124,9 @@ public class ReceiptinController {
@Autowired
private MaterialService materialService;
@Resource
private AccountingMapper accountingMapper;
/**
*
*
@ -157,6 +166,16 @@ public class ReceiptinController {
@PostMapping
@Transactional
public ActionResult create(@RequestBody @Valid ReceiptinCrForm receiptinCrForm) throws DataException {
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");
String date = simpleDateFormat.format(receiptinCrForm.getBusinessDate());
List<AccountingEntity> list = accountingMapper.queryAccounting(date);
if (list!=null && list.size()>0){
if (list.get(0).getStatus().equals("1")){
return ActionResult.fail("账期已关闭,无法在此区间开展业务");
}
}else{
return ActionResult.fail("账期不存在,无法在此区间开展业务");
}
String mainId =RandomUtil.uuId();
UserInfo userInfo=userProvider.get();
//receiptinCrForm.setDocumentno(generaterSwapUtil.getBillNumber("rukudanhao", false));
@ -479,6 +498,16 @@ public class ReceiptinController {
@PutMapping("/{id}")
@Transactional
public ActionResult update(@PathVariable("id") String id,@RequestBody @Valid ReceiptinUpForm receiptinUpForm) throws DataException {
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");
String date = simpleDateFormat.format(receiptinUpForm.getBusinessDate());
List<AccountingEntity> list = accountingMapper.queryAccounting(date);
if (list!=null && list.size()>0){
if (list.get(0).getStatus().equals("1")){
return ActionResult.fail("账期已关闭,无法在此区间开展业务");
}
}else{
return ActionResult.fail("账期不存在,无法在此区间开展业务");
}
UserInfo userInfo=userProvider.get();
ReceiptinEntity entity= receiptinService.getInfo(id);
if(entity!=null){

@ -108,4 +108,7 @@ public class ReceiptinEntity {
@TableField(exist = false)
private String supplier;
@TableField("BUSINESS_DATE")
private Date businessDate;
}

@ -2,8 +2,11 @@
package jnpf.receiptin.model.receiptin;
import com.baomidou.mybatisplus.annotation.TableField;
import jnpf.receiptin.model.receiptin.Receiptin_item0Model;
import lombok.Data;
import java.util.Date;
import java.util.List;
import java.math.BigDecimal;
import com.fasterxml.jackson.annotation.JsonProperty;
@ -75,5 +78,7 @@ public class ReceiptinCrForm {
@JsonProperty("receiptin_item0List")
private List<Receiptin_item0Model> receiptin_item0List;
@JsonProperty("businessDate")
private Long businessDate;
}

@ -3,6 +3,7 @@
package jnpf.receiptin.model.receiptin;
import com.baomidou.mybatisplus.annotation.TableField;
import jnpf.receiptin.model.receiptin.Receiptin_item0Model;
import lombok.Data;
import com.fasterxml.jackson.annotation.JsonProperty;
@ -83,4 +84,7 @@ public class ReceiptinInfoVO{
@JsonProperty("soucenoName")
private String soucenoName;
@JsonProperty("businessDate")
private Long businessDate;
}

@ -3,6 +3,7 @@
package jnpf.receiptin.model.receiptin;
import com.baomidou.mybatisplus.annotation.TableField;
import lombok.Data;
import java.sql.Time;
import java.util.Date;
@ -93,4 +94,7 @@ public class ReceiptinListVO{
@JsonProperty("supplier")
private String supplier;
@JsonProperty("businessDate")
private Long businessDate;
}

@ -89,4 +89,6 @@ public class ReceiptinUpForm{
@JsonProperty("receiptin_item0List")
private List<Receiptin_item0Model> receiptin_item0List;
@JsonProperty("businessDate")
private Long businessDate;
}

@ -8,6 +8,8 @@ import cn.afterturn.easypoi.excel.entity.enmus.ExcelType;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import jnpf.accounting.entity.AccountingEntity;
import jnpf.accounting.mapper.AccountingMapper;
import jnpf.base.ActionResult;
import jnpf.base.vo.PageListVO;
import jnpf.base.vo.PaginationVO;
@ -57,11 +59,15 @@ import jnpf.receiptout.service.Receiptout_item0Service;
import org.springframework.web.bind.annotation.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.multipart.MultipartFile;
import javax.annotation.Resource;
import javax.validation.Valid;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import jnpf.util.GeneraterSwapUtil;
import java.text.SimpleDateFormat;
import java.util.*;
import jnpf.util.file.UploadUtil;
@ -112,6 +118,9 @@ public class ReceiptoutController {
@Autowired
private WareHouseService wareHouseService;
@Resource
private AccountingMapper accountingMapper;
/**
*
*
@ -121,6 +130,16 @@ public class ReceiptoutController {
@PostMapping("/saleordercreate")
@Transactional
public ActionResult saleorderCreate(@RequestBody @Valid ReceiptoutCrForm receiptoutCrForm) throws DataException {
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");
String date = simpleDateFormat.format(receiptoutCrForm.getBusinessDate());
List<AccountingEntity> list = accountingMapper.queryAccounting(date);
if (list!=null && list.size()>0){
if (list.get(0).getStatus().equals("1")){
return ActionResult.fail("账期已关闭,无法在此区间开展业务");
}
}else{
return ActionResult.fail("账期不存在,无法在此区间开展业务");
}
String mainId =RandomUtil.uuId();
UserInfo userInfo=userProvider.get();
receiptoutCrForm.setDocumentNo(receiptoutCrForm.getDocumentNo());
@ -196,6 +215,16 @@ public class ReceiptoutController {
@PostMapping
@Transactional
public ActionResult create(@RequestBody @Valid ReceiptoutCrForm receiptoutCrForm) throws DataException {
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");
String date = simpleDateFormat.format(new Date());
List<AccountingEntity> list = accountingMapper.queryAccounting(date);
if (list!=null && list.size()>0){
if (list.get(0).getStatus().equals("1")){
return ActionResult.fail("账期已关闭,无法在此区间开展业务");
}
}else{
return ActionResult.fail("账期不存在,无法在此区间开展业务");
}
String mainId =RandomUtil.uuId();
UserInfo userInfo=userProvider.get();
// receiptoutCrForm.setDocumentNo(generaterSwapUtil.getBillNumber("chuku", false));
@ -513,6 +542,16 @@ public class ReceiptoutController {
@PutMapping("/{id}")
@Transactional
public ActionResult update(@PathVariable("id") String id,@RequestBody @Valid ReceiptoutUpForm receiptoutUpForm) throws DataException {
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");
String date = simpleDateFormat.format(receiptoutUpForm.getBusinessDate());
List<AccountingEntity> list = accountingMapper.queryAccounting(date);
if (list!=null && list.size()>0){
if (list.get(0).getStatus().equals("1")){
return ActionResult.fail("账期已关闭,无法在此区间开展业务");
}
}else{
return ActionResult.fail("账期不存在,无法在此区间开展业务");
}
if (StringUtils.isNotEmpty(receiptoutUpForm.getSourceNo())){
SaleorderitemEntity saleorderitemEntity = saleorderitemService.getById(receiptoutUpForm.getSourceNo());
if (StringUtils.isNotEmpty(saleorderitemEntity.getStatus())){

@ -102,6 +102,9 @@ public class ReceiptoutEntity {
@TableField("CUSTOMER_ID")
private String customerId;
@TableField("BUSINESS_DATE")
private Date businessDate;
@TableField(exist = false)
private String customerNm;
@TableField(exist = false)

@ -81,5 +81,8 @@ public class ReceiptoutCrForm {
@JsonProperty("receiptout_item0List")
private List<Receiptout_item0Model> receiptout_item0List;
@JsonProperty("businessDate")
private Long businessDate;
}

@ -93,5 +93,7 @@ public class ReceiptoutInfoVO{
@JsonProperty("customerName")
private String customerName;
@JsonProperty("businessDate")
private Long businessDate;
}

@ -102,7 +102,8 @@ public class ReceiptoutListVO{
@TableField(exist = false)
private String sourceOrderNo;
@JsonProperty("businessDate")
private Long businessDate;

@ -97,7 +97,9 @@ public class ReceiptoutUpForm{
/** 子表数据 **/
@JsonProperty("receiptout_item0List")
private List<Receiptout_item0Model> receiptout_item0List;
/** 业务日期*/
@JsonProperty("businessDate")
private Long businessDate;
}

@ -13,6 +13,8 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import jnpf.accounting.entity.AccountingEntity;
import jnpf.accounting.mapper.AccountingMapper;
import jnpf.arinvoices.entity.ArinvoicesEntity;
import jnpf.arinvoices.entity.Arinvoices_item0Entity;
import jnpf.arinvoices.entity.Arinvoices_item1Entity;
@ -93,6 +95,8 @@ import jnpf.saleorder.service.PaymentsoitemService;
import org.springframework.web.bind.annotation.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.multipart.MultipartFile;
import javax.annotation.Resource;
import javax.validation.Valid;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
@ -100,11 +104,13 @@ import java.io.IOException;
import jnpf.util.GeneraterSwapUtil;
import java.math.BigDecimal;
import java.text.SimpleDateFormat;
import java.util.*;
import java.util.stream.Collectors;
import jnpf.util.file.UploadUtil;
import jnpf.util.enums.FileTypeEnum;
import sun.java2d.pipe.SpanShapeRenderer;
/**
*
@ -177,6 +183,9 @@ public class SaleorderitemController {
@Autowired
private Saleback_item0Service saleback_item0Service;
@Resource
private AccountingMapper accountingMapper;
/**
*
@ -522,6 +531,16 @@ public class SaleorderitemController {
@PostMapping
@Transactional
public ActionResult create(@RequestBody @Valid SaleorderitemCrForm saleorderitemCrForm) throws DataException {
SimpleDateFormat simpleDateFormat = new SimpleDateFormat();
String date = simpleDateFormat.format(saleorderitemCrForm.getBusinessDate());
List<AccountingEntity> list = accountingMapper.queryAccounting(date);
if (list!=null && list.size()>0){
if (list.get(0).getStatus().equals("1")){
return ActionResult.fail("账期已关闭,无法在此区间开展业务");
}
}else{
return ActionResult.fail("账期不存在,无法在此区间开展业务");
}
//先判断磅单是否开进项票
List<Salesorder_item0Entity> Salesorder_item0List = JsonUtil.getJsonToList(saleorderitemCrForm.getSalesorder_item0List(),Salesorder_item0Entity.class);
for (Salesorder_item0Entity salesorder_item0Entity : Salesorder_item0List){
@ -1056,6 +1075,19 @@ public class SaleorderitemController {
@PutMapping("/{id}")
@Transactional
public ActionResult update(@PathVariable("id") String id,@RequestBody @Valid SaleorderitemUpForm saleorderitemUpForm) throws DataException {
SimpleDateFormat simpleDateFormat = new SimpleDateFormat();
String date = "";
if (saleorderitemUpForm.getBusinessDate() != null){
date = simpleDateFormat.format(saleorderitemUpForm.getBusinessDate());
}
List<AccountingEntity> list = accountingMapper.queryAccounting(date);
if (list!=null && list.size()>0){
if (list.get(0).getStatus().equals("1")){
return ActionResult.fail("账期已关闭,无法在此区间开展业务");
}
}else{
return ActionResult.fail("账期不存在,无法在此区间开展业务");
}
UserInfo userInfo=userProvider.get();
SaleorderitemEntity entity= saleorderitemService.getInfo(id);
if(entity!=null){

@ -173,6 +173,9 @@ public class SaleorderitemEntity {
@TableField("BID_SECTION")
private String bidSection;
@TableField("BUSINESS_DATE")
private Date businessDate;
@TableField(exist = false)
private BigDecimal amount;
@TableField(exist = false)

@ -130,6 +130,9 @@ public class SaleorderitemCrForm {
@TableField("bidSection")
private String bidSection;
@JsonProperty("businessDate")
private Long businessDate;
@TableField("isTransfer")
private String isTransfer;
@TableField("purchaseOrderId")

@ -141,6 +141,9 @@ public class SaleorderitemInfoVO{
@TableField("bidSection")
private String bidSection;
@JsonProperty("businessDate")
private Long businessDate;
@TableField("contractName")
private String contractName;

@ -120,6 +120,9 @@ public class SaleorderitemListVO{
@TableField("bidSection")
private String bidSection;
@JsonProperty("businessDate")
private Long businessDate;
@TableField(exist = false)
private String contractName;
@TableField(exist = false)

@ -154,4 +154,7 @@ public class SaleorderitemUpForm{
@TableField("bidSection")
private String bidSection;
@JsonProperty("businessDate")
private Long businessDate;
}

@ -1,7 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="jnpf.mapper.AccountingMapper">
<mapper namespace="jnpf.accounting.mapper.AccountingMapper">
<select id="queryAccounting" resultType="jnpf.accounting.entity.AccountingEntity">
select * from jg_accounting
where start_date &lt;= #{businessDate}
and end_date &gt;= #{businessDate}
</select>
</mapper>

@ -194,4 +194,5 @@ a.id=#{id}
<select id="querySaleorderAmountStatistics" resultType="Double">
select IFNULL(convert(SUM(price)/10000,decimal(15,2)), 0) from jg_salesorder where DATE_FORMAT(creator_time,'%Y-%m-%d') = #{date} and (status = '2' OR status = '3')
</select>
</mapper>

@ -17,7 +17,7 @@
</el-col>
<el-col :span="8" >
<el-form-item label="业务日期"
prop="businessDate" >
prop="businessDate" required>
<el-date-picker v-model="dataForm.businessDate"
placeholder="请选择" clearable :style='{"width":"100%"}' type="date" format="yyyy-MM-dd" value-format="timestamp" >

@ -81,6 +81,15 @@
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="业务日期"
prop="businessDate" required>
<el-date-picker v-model="dataForm.businessDate" placeholder="请选择" clearable :style='{"width":"100%"}'
type="date" format="yyyy-MM-dd" value-format="timestamp" >
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="备注信息" prop="remark">
<el-input v-model="dataForm.remark" placeholder="请输入" clearable :style='{"width":"100%"}'>
@ -248,6 +257,7 @@
loading: false,
isDetail: false,
dataForm: {
businessDate: '',
code: '',
customerCode: '',
documentNo: '',
@ -575,6 +585,7 @@
data[key] = "";
}
}
this.dataForm.businessDate = new Date().getTime();
this.dataForm.paymentType = '0'
this.dataForm.currency = '0'
this.dataForm.settlementType = '0'

@ -467,8 +467,22 @@
})
},
request() {
this.submitDisabled = true;
var _data = this.dataList()
var flag = true;
this.dataForm.payment_item0List.forEach((item,index) => {
if (item.amount < 0){
flag = false
}
})
if (!flag){
this.$message({
type: 'error',
message: '付款金额不能为负数',
duration: 3000
});
return
}
this.submitDisabled = true;
if (!this.dataForm.id) {
request({
url: '/api/payment/Payment',

@ -502,10 +502,14 @@
},
request() {
var statusFlag = true;
var flag = true;
this.dataForm.payment_item0List.forEach((item,index) => {
if (this.jnpf.floatAdd(item.amount, item.paymentAmount) > item.requestAmount){
statusFlag = false;
}
if (item.amount < 0){
flag = false;
}
})
if (!statusFlag){
this.$message({
@ -515,6 +519,14 @@
});
return
}
if (!flag){
this.$message({
type: 'error',
message: '付款金额不能为负数',
duration: 3000
});
return
}
this.submitDisabled = true;
var _data = this.dataList()
debugger

@ -87,6 +87,15 @@
</el-input-number>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="业务日期"
prop="businessDate" required>
<el-date-picker v-model="dataForm.businessDate" placeholder="请选择" clearable :style='{"width":"100%"}'
type="date" format="yyyy-MM-dd" value-format="timestamp" >
</el-date-picker>
</el-form-item>
</el-col>
<!-- <el-col :span="8">
<el-form-item label="已付款金额" prop="payPrice">
<el-input-number v-model="dataForm.payPrice" placeholder="数字文本" :step="1" :precision="6" :style='{"width":"100%"}'>
@ -601,6 +610,7 @@
loading: false,
isDetail: false,
dataForm: {
businessDate: '',
documentNo: '',
contractCode: "",
supplierId: "",
@ -924,6 +934,7 @@
init(itemArr) {
this.dataForm.id = '';
this.visible = true
this.dataForm.businessDate = new Date().getTime()
this.dataForm.purchaseName = itemArr[0].purchaseName
this.dataForm.contractCode = itemArr[0].purchaseId
this.dataForm.supplierId = itemArr[0].supplierId

@ -105,7 +105,34 @@
</el-input-number>
</el-form-item>
</el-col>
<el-col :span="16">
<el-col :span="8">
<el-form-item label="考核金额"
prop="assessmentPirce">
<el-input v-model="dataForm.assessmentPirce"
placeholder="请输入" clearable :style='{"width":"100%"}'>
</el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="所属标段"
prop="bidSection">
<el-input v-model="dataForm.bidSection"
placeholder="请输入" clearable :style='{"width":"100%"}'>
</el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="业务日期"
prop="businessDate" required>
<el-date-picker v-model="dataForm.businessDate" placeholder="请选择" clearable :style='{"width":"100%"}'
type="date" format="yyyy-MM-dd" value-format="timestamp" >
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="备注信息"
prop="remark">
<el-input v-model="dataForm.remark"
@ -724,6 +751,9 @@
loading: false,
isDetail: false,
dataForm: {
bidSection: '',
assessmentPirce: '',
businessDate: '',
isTransfer: '',
purchaseOrderId: [],
documentNo: '',
@ -1028,7 +1058,7 @@
this.dataForm.customerName = list[0].customerName
this.dataForm.isTransfer = list.isTransfer
this.dataForm.purchaseOrderId = list.purchaseOrderId
debugger
this.dataForm.businessDate = new Date().getTime()
var num = 0
var amount = 0
var advance = 0
@ -1066,6 +1096,7 @@
this.dataForm.customerName = list[0].customerName
this.dataForm.isTransfer = list.isTransfer
this.dataForm.purchaseOrderId = list.purchaseOrderId
this.dataForm.businessDate = new Date()
var num = 0
var amount = 0
var advance = 0

@ -91,6 +91,15 @@
</el-input-number>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="业务日期"
prop="businessDate" required>
<el-date-picker v-model="dataForm.businessDate" placeholder="请选择" clearable :style='{"width":"100%"}'
type="date" format="yyyy-MM-dd" value-format="timestamp" >
</el-date-picker>
</el-form-item>
</el-col>
<!-- <el-col :span="8">
<el-form-item label="已付款金额" prop="payPrice">
<el-input-number v-model="dataForm.payPrice" placeholder="数字文本" :step="1" :precision="6" :style='{"width":"100%"}'>
@ -583,6 +592,7 @@
loading: false,
isDetail: false,
dataForm: {
businessDate: '',
documentNo: '',
contractCode: "",
supplierId: "",

@ -12,9 +12,9 @@
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="业务日期" prop="businessDate">
<el-form-item label="业务日期" prop="businessDate" required>
<el-date-picker v-model="dataForm.businessDate" placeholder="请选择业务日期" clearable :style='{"width":"100%"}'
type="date" format="yyyy-MM-dd" value-format="timestamp" :disabled="true">
type="date" format="yyyy-MM-dd" value-format="timestamp" >
</el-date-picker>
</el-form-item>

@ -310,7 +310,7 @@ export default {
this.fileName = res.data.name
} else {
this.fileList = fileList.filter(o => o.uid != file.uid)
this.$message({ message: res.msg, type: 'error', duration: 1000 })
this.$message({ message: res.msg, type: 'error', duration: 2000 })
}
}
}

@ -73,7 +73,7 @@
</el-input>
</el-form-item> -->
<el-form-item label="供应商id" prop="supplierId">
<el-form-item label="供应商" prop="supplierId">
<!-- <popupSelect v-model="dataForm.supplierId" placeholder="请选择" clearable field="supplierId"
interfaceId="397751667988199621" :columnOptions="supplierIdcolumnOptions"
propsValue="id" relationField="supplier_name" popupType="dialog" popupTitle="选择数据"
@ -85,7 +85,15 @@
</el-input>
</el-form-item>
</el-col>
<el-col :span="16">
<el-col :span="8">
<el-form-item label="业务日期" prop="businessDate" required>
<el-date-picker v-model="dataForm.businessDate" placeholder="请选择业务日期" clearable :style='{"width":"100%"}'
type="date" format="yyyy-MM-dd" value-format="timestamp" >
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="备注" prop="remark">
<el-input v-model="dataForm.remark" placeholder="请输入供应商名称" clearable
:style='{"width":"100%"}'>
@ -328,6 +336,7 @@
loading: false,
isDetail: false,
dataForm: {
businessDate: '',
documentno: '',
type: "",
souceno: "",
@ -658,6 +667,7 @@
debugger
this.dataForm.id = '';
this.visible = true
this.dataForm.businessDate = new Date().getTime();
this.dataForm.souceno = purchaseorder.id;
this.dataForm.type = '0';
this.dataForm.receiptamount = purchaseorder.amount;

@ -85,7 +85,15 @@
</el-input>
</el-form-item>
</el-col>
<el-col :span="16">
<el-col :span="8">
<el-form-item label="业务日期" prop="businessDate" required>
<el-date-picker v-model="dataForm.businessDate" placeholder="请选择业务日期" clearable :style='{"width":"100%"}'
type="date" format="yyyy-MM-dd" value-format="timestamp" >
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="备注" prop="remark">
<el-input v-model="dataForm.remark" placeholder="请输入供应商名称" clearable
:style='{"width":"100%"}'>
@ -289,6 +297,7 @@
loading: false,
isDetail: false,
dataForm: {
businessDate: '',
documentno: '',
type: "",
souceno: "",

@ -75,7 +75,16 @@
</el-input>
</el-form-item>
</el-col>
<el-col :span="16">
<el-col :span="8">
<el-form-item label="业务日期"
prop="businessDate" required>
<el-date-picker v-model="dataForm.businessDate" placeholder="请选择" clearable :style='{"width":"100%"}'
type="date" format="yyyy-MM-dd" value-format="timestamp" >
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="备注" prop="remark">
<el-input v-model="dataForm.remark" placeholder="请输入" clearable :style='{"width":"100%"}'>
@ -262,6 +271,7 @@
loading: false,
isDetail: false,
dataForm: {
businessDate: '',
documentNo: '',
type: "0",
salesId: "XS002",

@ -122,6 +122,15 @@
</el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="业务日期"
prop="remark" required>
<el-date-picker v-model="dataForm.businessDate" placeholder="请选择" clearable :style='{"width":"100%"}'
type="date" format="yyyy-MM-dd" value-format="timestamp" >
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="备注信息"
prop="remark">
@ -682,6 +691,7 @@
loading: false,
isDetail: false,
dataForm: {
businessDate: '',
documentNo: '',
contractCode: "",
costomerCode: "",

@ -17,7 +17,7 @@
</el-col>
<el-col :span="8" >
<el-form-item label="业务日期"
prop="businessDate" >
prop="businessDate" required>
<el-date-picker v-model="dataForm.businessDate"
placeholder="请选择" clearable :style='{"width":"100%"}' type="date" format="yyyy-MM-dd" value-format="timestamp" >
@ -557,6 +557,7 @@
}
},
init(list) {
this.dataForm.id = '';
this.dataForm.businessDate = new Date().getTime();
this.visible = true;
let amount = 0;

@ -333,6 +333,7 @@
}
},
init(list) {
this.dataForm.id = '';
let amountCollected = 0;
this.dataForm.amountCollected = null;
this.visible = true;

@ -85,7 +85,16 @@
</el-input>
</el-form-item>
</el-col>
<el-col :span="16">
<el-col :span="8">
<el-form-item label="业务日期"
prop="businessDate" required>
<el-date-picker v-model="dataForm.businessDate" placeholder="请选择" clearable :style='{"width":"100%"}'
type="date" format="yyyy-MM-dd" value-format="timestamp" >
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="备注"
prop="remark">
<el-input v-model="dataForm.remark"
@ -274,6 +283,7 @@
loading: false,
isDetail: false,
dataForm: {
businessDate: '',
documentNo: '',
type: "0",
salesId: "",
@ -428,7 +438,9 @@
}
},
init(list) {
this.dataForm.id = '';
this.visible = true;
this.dataForm.businessDate = new Date().getTime();
this.dataForm.documentNo = list[0].documentNo;
this.dataForm.amount = list[0].price;
this.dataForm.num = list[0].num;

Loading…
Cancel
Save