杨世强 2 years ago
commit 6ebddaa9c4

@ -6,10 +6,9 @@ import jnpf.base.ActionResult;
import jnpf.base.vo.PageListVO;
import jnpf.base.vo.PaginationVO;
import jnpf.contractMobile.entity.ContractItem0MobileEntity;
import jnpf.contractMobile.entity.ContractItem1MobileEntity;
import jnpf.contractMobile.entity.ContractMobileEntity;
import jnpf.contractMobile.model.contractMobile.ContractMobileInfoVO;
import jnpf.contractMobile.model.contractMobile.ContractMobileListVO;
import jnpf.contractMobile.model.contractMobile.ContractMobilePagination;
import jnpf.contractMobile.model.contractMobile.*;
import jnpf.contractMobile.service.ContractMobileService;
import jnpf.util.JsonUtil;
import lombok.extern.slf4j.Slf4j;
@ -48,8 +47,15 @@ public class ContractMobileController {
//子表
List<ContractItem0MobileEntity> contractItem0MobileList = contractMobileService.getContractItem0MobileList(id);
System.out.println(contractItem0MobileList);
//vo.getContractItem0List(JsonUtil.getJsonToList(contractItem0MobileList, ContractItem0MobileListVO.class));
for (ContractItem0MobileEntity contractItem0MobileEntity : contractItem0MobileList) {
//System.out.println(contractItem0MobileEntity);
}
vo.setContractItem0List(JsonUtil.getJsonToList(contractItem0MobileList, ContractItem0MobileListVO.class));
List<ContractItem1MobileEntity> contractItem1MobileList = contractMobileService.getContractItem1MobileList(id);
for (ContractItem1MobileEntity contractItem1MobileEntity : contractItem1MobileList) {
//System.out.println(contractItem1MobileEntity);
}
vo.setContractItem1List(JsonUtil.getJsonToList(contractItem1MobileList, ContractItem1MobileListVO.class));
return ActionResult.success(vo);
}

@ -2,6 +2,7 @@ package jnpf.contractMobile.service;
import com.baomidou.mybatisplus.extension.service.IService;
import jnpf.contractMobile.entity.ContractItem0MobileEntity;
import jnpf.contractMobile.entity.ContractItem1MobileEntity;
import jnpf.contractMobile.entity.ContractMobileEntity;
import jnpf.contractMobile.model.contractMobile.ContractMobilePagination;
@ -14,4 +15,6 @@ public interface ContractMobileService extends IService<ContractMobileEntity> {
ContractMobileEntity getInfo(String id);
List<ContractItem0MobileEntity> getContractItem0MobileList(String id);
List<ContractItem1MobileEntity> getContractItem1MobileList(String id);
}

@ -5,10 +5,12 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import jnpf.contractMobile.entity.ContractItem0MobileEntity;
import jnpf.contractMobile.entity.ContractItem1MobileEntity;
import jnpf.contractMobile.entity.ContractMobileEntity;
import jnpf.contractMobile.mapper.ContractMobileMapper;
import jnpf.contractMobile.model.contractMobile.ContractMobilePagination;
import jnpf.contractMobile.service.ContractItem0MobileService;
import jnpf.contractMobile.service.ContractItem1MobileService;
import jnpf.contractMobile.service.ContractMobileService;
import jnpf.util.ServletUtil;
import jnpf.util.UserProvider;
@ -68,6 +70,9 @@ public class ContractMobileServiceImpl extends ServiceImpl<ContractMobileMapper,
@Autowired
private ContractItem0MobileService contractItem0MobileService;
@Autowired
private ContractItem1MobileService contractItem1MobileService;
@Override
public ContractMobileEntity getInfo(String id) {
QueryWrapper<ContractMobileEntity> queryWrapper = new QueryWrapper<>();
@ -80,4 +85,10 @@ public class ContractMobileServiceImpl extends ServiceImpl<ContractMobileMapper,
queryWrapper.lambda().eq(ContractItem0MobileEntity::getContractId, id);
return contractItem0MobileService.list(queryWrapper);
}
@Override
public List<ContractItem1MobileEntity> getContractItem1MobileList(String id) {
QueryWrapper<ContractItem1MobileEntity> queryWrapper = new QueryWrapper<>();
queryWrapper.lambda().eq(ContractItem1MobileEntity::getContractId, id);
return contractItem1MobileService.list(queryWrapper);
}
}

@ -12,7 +12,9 @@ import jnpf.customer.entity.CustomerEntity;
import jnpf.permission.model.authorize.AuthorizeConditionModel;
import jnpf.contractfile.model.contractfile.ContractFilePagination;
import jnpf.permission.service.AuthorizeService;
import java.lang.reflect.Field;
import com.baomidou.mybatisplus.annotation.TableField;
@ -57,6 +59,9 @@ public class ContractFileServiceImpl extends ServiceImpl<ContractFileMapper, Con
@Autowired
private CustomerVMapper customerMapper;
@Autowired
private ContractFileMapper contractFileMapper;
@Override
public List<ContractFileEntity> getList(ContractFilePagination contractFilePagination) {
@ -284,22 +289,35 @@ public class ContractFileServiceImpl extends ServiceImpl<ContractFileMapper, Con
for (int i = 0; i < personList.size(); i++) {
Map<String, Object> dataRowMap = new HashMap<>();
ContractFileModel model = personList.get(i);
dataRowMap.put("contractCode", model.getContractCode());
dataRowMap.put("contractName", model.getContractName());
dataRowMap.put("contractNo", model.getContractNo());
dataRowMap.put("contractType", model.getContractType());
dataRowMap.put("classification", model.getClassification());
dataRowMap.put("declarationDate", model.getDeclarationDate());
dataRowMap.put("name", model.getName());
dataRowMap.put("num", model.getNum());
dataRowMap.put("amount", model.getAmount());
dataRowMap.put("deptName", model.getDeptName());
dataRowMap.put("remark", model.getRemark());
dataRowMap.put("creatorusername", model.getCreatorusername());
dataRowMap.put("status", model.getStatus());
dataRowMap.put("approval", model.getApproval());
dataRow.add(dataRowMap);
QueryWrapper<ContractFileEntity> queryWrapper = new QueryWrapper<>();
queryWrapper
.eq("contract_name", model.getContractName())
.eq("contract_code", model.getContractCode())
.eq("name", model.getName());
List<ContractFileEntity> list = contractFileMapper.selectList(queryWrapper);
if (list.size() > 0) {
System.out.println(list);
} else {
dataRowMap.put("contractCode", model.getContractCode());
dataRowMap.put("contractName", model.getContractName());
dataRowMap.put("contractNo", model.getContractNo());
dataRowMap.put("contractType", model.getContractType());
dataRowMap.put("classification", model.getClassification());
dataRowMap.put("declarationDate", model.getDeclarationDate());
dataRowMap.put("name", model.getName());
dataRowMap.put("num", model.getNum());
dataRowMap.put("amount", model.getAmount());
dataRowMap.put("deptName", model.getDeptName());
dataRowMap.put("remark", model.getRemark());
dataRowMap.put("creatorusername", model.getCreatorusername());
dataRowMap.put("status", model.getStatus());
dataRowMap.put("approval", model.getApproval());
dataRow.add(dataRowMap);
}
}
for (int i = 1; i < 15; i++) {
Map<String, Object> columnsMap = new HashMap<>();
columnsMap.put("AllowDBNull", true);
@ -337,47 +355,49 @@ public class ContractFileServiceImpl extends ServiceImpl<ContractFileMapper, Con
@Override
public ContractfileImportVO importData(List<ContractFileModel> dt) {
for (ContractFileModel model : dt) {
model.setCreatorTime(DateUtil.cstFormat(model.getCreatorTime()));
model.setNum(DateUtil.cstFormat(model.getNum()));
if (model.getContractType() != null) {
if (model.getContractType().equals("采购合同")) {
model.setContractType("0");
if (model.getName()!= null) {
QueryWrapper<SupplierEntity> queryWrappers = new QueryWrapper<SupplierEntity>();
queryWrappers.eq("supplier_name",model.getName());
List<SupplierEntity> list = supplierMapper.selectList(queryWrappers);
if (list.size()>0){
model.setCode(list.get(0).getId());
model.setCreatorTime(DateUtil.cstFormat(model.getCreatorTime()));
model.setNum(DateUtil.cstFormat(model.getNum()));
if (model.getContractType() != null) {
if (model.getContractType().equals("采购合同")) {
model.setContractType("0");
if (model.getName() != null) {
QueryWrapper<SupplierEntity> queryWrappers = new QueryWrapper<SupplierEntity>();
queryWrappers.eq("supplier_name", model.getName());
List<SupplierEntity> list = supplierMapper.selectList(queryWrappers);
if (list.size() > 0) {
model.setCode(list.get(0).getId());
}
}
}
} else if (model.getContractType().equals("销售合同")) {
model.setContractType("1");
if (model.getName()!=null){
QueryWrapper<CustomerEntity> queryWrappers = new QueryWrapper<CustomerEntity>();
queryWrappers.eq("supplier_nm",model.getName());
List<CustomerEntity> list = customerMapper.selectList(queryWrappers);
if (list.size()>0){
model.setCode(list.get(0).getId());
} else if (model.getContractType().equals("销售合同")) {
model.setContractType("1");
if (model.getName() != null) {
QueryWrapper<CustomerEntity> queryWrappers = new QueryWrapper<CustomerEntity>();
queryWrappers.eq("supplier_nm", model.getName());
List<CustomerEntity> list = customerMapper.selectList(queryWrappers);
if (list.size() > 0) {
model.setCode(list.get(0).getId());
}
}
}
}
}
if (model.getClassification() != null) {
if (model.getClassification().equals("采购类")) {
model.setClassification("0");
} else if (model.getClassification().equals("销售类")) {
model.setClassification("1");
if (model.getClassification() != null) {
if (model.getClassification().equals("采购类")) {
model.setClassification("0");
} else if (model.getClassification().equals("销售类")) {
model.setClassification("1");
}
}
}
if (model.getStatus() != null) {
if (model.getStatus().equals("合同进行中")) {
model.setStatus("0");
} else if (model.getStatus().equals("合同审批中")) {
model.setStatus("1");
} else if (model.getStatus().equals("合同审批结束")) {
model.setStatus("2");
if (model.getStatus() != null) {
if (model.getStatus().equals("合同进行中")) {
model.setStatus("0");
} else if (model.getStatus().equals("合同审批中")) {
model.setStatus("1");
} else if (model.getStatus().equals("合同审批结束")) {
model.setStatus("2");
}
}
}
}
List<ContractFileEntity> entitys = JsonUtil.getJsonToList(dt, ContractFileEntity.class);
//记录成功了几条

@ -213,7 +213,7 @@ public class PaymentController {
List<PaymentdocEntity> list = paymentdocService.list(paymentdocEntityWrapper);
for (PaymentdocEntity paymentdocEntity: list) {
paymentdocEntity.setDocStatus("3");//已付款
paymentdocEntity.setRamount(new BigDecimal(entity.getPaymentaccount()));
paymentdocEntity.setRamount(entity.getPaymentamount());
paymentdocService.updateById(paymentdocEntity);
}
List<Payment_item0Entity> Payment_item0List = JsonUtil.getJsonToList(paymentCrForm.getPayment_item0List(),Payment_item0Entity.class);

@ -3,6 +3,7 @@ package jnpf.poundlist.entity;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import jnpf.base.Pagination;
import lombok.Data;
import java.math.BigDecimal;
@ -18,8 +19,8 @@ import java.util.Date;
* @ 2023-02-21
*/
@Data
@TableName("jg_poundlist")
public class PoundlistSEntity {
//@TableName("jg_poundlist")
public class PoundlistSEntity extends Pagination {
@TableId("ID")
private String id;
@ -218,4 +219,9 @@ public class PoundlistSEntity {
@TableField(exist = false)
private String contractName;
/**
* id
*/
private String menuId;
}

@ -73,32 +73,32 @@ public class PoundlistServiceImpl extends ServiceImpl<PoundlistMapper, Poundlist
String userId=userProvider.get().getUserId();
List<String> AllIdList =new ArrayList();
int total=0;
int poundlistNum =0;
int poundlistNum =0;
QueryWrapper<PoundlistEntity> poundlistQueryWrapper=new QueryWrapper<>();
poundlistQueryWrapper.lambda().eq(PoundlistEntity::getIsExamine,"1");
boolean pcPermission = true;
boolean appPermission = true;
boolean isPc = ServletUtil.getHeader("jnpf-origin").equals("pc");
if(isPc && pcPermission){
if (!userProvider.get().getIsAdministrator()){
Object poundlistObj=authorizeService.getCondition(new AuthorizeConditionModel(poundlistQueryWrapper,poundlistPagination.getMenuId(),"jg_poundlist"));
if (ObjectUtil.isEmpty(poundlistObj)){
return new ArrayList<>();
} else {
poundlistQueryWrapper = (QueryWrapper<PoundlistEntity>)poundlistObj;
poundlistNum++;
boolean pcPermission = true;
boolean appPermission = true;
boolean isPc = ServletUtil.getHeader("jnpf-origin").equals("pc");
if(isPc && pcPermission){
if (!userProvider.get().getIsAdministrator()){
Object poundlistObj=authorizeService.getCondition(new AuthorizeConditionModel(poundlistQueryWrapper,poundlistPagination.getMenuId(),"jg_poundlist"));
if (ObjectUtil.isEmpty(poundlistObj)){
return new ArrayList<>();
} else {
poundlistQueryWrapper = (QueryWrapper<PoundlistEntity>)poundlistObj;
poundlistNum++;
}
}
}
}
if(!isPc && appPermission){
if (!userProvider.get().getIsAdministrator()){
Object poundlistObj=authorizeService.getCondition(new AuthorizeConditionModel(poundlistQueryWrapper,poundlistPagination.getMenuId(),"jg_poundlist"));
if (ObjectUtil.isEmpty(poundlistObj)){
return new ArrayList<>();
} else {
poundlistQueryWrapper = (QueryWrapper<PoundlistEntity>)poundlistObj;
poundlistNum++;
}
if(!isPc && appPermission){
if (!userProvider.get().getIsAdministrator()){
Object poundlistObj=authorizeService.getCondition(new AuthorizeConditionModel(poundlistQueryWrapper,poundlistPagination.getMenuId(),"jg_poundlist"));
if (ObjectUtil.isEmpty(poundlistObj)){
return new ArrayList<>();
} else {
poundlistQueryWrapper = (QueryWrapper<PoundlistEntity>)poundlistObj;
poundlistNum++;
}
}
@ -109,12 +109,12 @@ public class PoundlistServiceImpl extends ServiceImpl<PoundlistMapper, Poundlist
Long fir = Long.valueOf(PoundDateList.get(0));
Long sec = Long.valueOf(PoundDateList.get(1));
poundlistQueryWrapper.lambda().ge(PoundlistEntity::getPoundDate, new Date(fir))
.le(PoundlistEntity::getPoundDate, DateUtil.stringToDate(DateUtil.daFormatYmd(sec) + " 23:59:59"));
poundlistQueryWrapper.lambda().ge(PoundlistEntity::getPoundDate, new Date(fir))
.le(PoundlistEntity::getPoundDate, DateUtil.stringToDate(DateUtil.daFormatYmd(sec) + " 23:59:59"));
}
}
if(StringUtil.isNotEmpty(poundlistPagination.getPoundlistNo())){
if(StringUtil.isNotEmpty(poundlistPagination.getPoundlistNo())){
poundlistNum++;
poundlistQueryWrapper.lambda().like(PoundlistEntity::getPoundlistNo,poundlistPagination.getPoundlistNo());
}
@ -211,7 +211,7 @@ public class PoundlistServiceImpl extends ServiceImpl<PoundlistMapper, Poundlist
}
//排序
if(StringUtil.isEmpty(poundlistPagination.getSidx())){
poundlistQueryWrapper.lambda().orderByDesc(PoundlistEntity::getId);
poundlistQueryWrapper.lambda().orderByDesc(PoundlistEntity::getId);
}else{
try {
String sidx = poundlistPagination.getSidx();
@ -225,9 +225,9 @@ public class PoundlistServiceImpl extends ServiceImpl<PoundlistMapper, Poundlist
}
}
if((total>0 && AllIdList.size()>0) || total==0){
Page<PoundlistEntity> page=new Page<>(poundlistPagination.getCurrentPage(), poundlistPagination.getPageSize());
IPage<PoundlistEntity> userIPage=this.page(page, poundlistQueryWrapper);
return poundlistPagination.setData(userIPage.getRecords(),userIPage.getTotal());
Page<PoundlistEntity> page=new Page<>(poundlistPagination.getCurrentPage(), poundlistPagination.getPageSize());
IPage<PoundlistEntity> userIPage=this.page(page, poundlistQueryWrapper);
return poundlistPagination.setData(userIPage.getRecords(),userIPage.getTotal());
}else{
List<PoundlistEntity> list = new ArrayList();
return poundlistPagination.setData(list, list.size());
@ -237,66 +237,66 @@ public class PoundlistServiceImpl extends ServiceImpl<PoundlistMapper, Poundlist
public List<PoundlistEntity> getTypeList(PoundlistPagination poundlistPagination,String dataType){
String userId=userProvider.get().getUserId();
List<String> AllIdList =new ArrayList();
int total=0;
int poundlistNum =0;
int total=0;
int poundlistNum =0;
QueryWrapper<PoundlistEntity> poundlistQueryWrapper=new QueryWrapper<>();
boolean pcPermission = true;
boolean appPermission = true;
boolean isPc = ServletUtil.getHeader("jnpf-origin").equals("pc");
if(isPc && pcPermission){
if (!userProvider.get().getIsAdministrator()){
Object poundlistObj=authorizeService.getCondition(new AuthorizeConditionModel(poundlistQueryWrapper,poundlistPagination.getMenuId(),"jg_poundlist"));
if (ObjectUtil.isEmpty(poundlistObj)){
return new ArrayList<>();
} else {
poundlistQueryWrapper = (QueryWrapper<PoundlistEntity>)poundlistObj;
poundlistNum++;
boolean pcPermission = true;
boolean appPermission = true;
boolean isPc = ServletUtil.getHeader("jnpf-origin").equals("pc");
if(isPc && pcPermission){
if (!userProvider.get().getIsAdministrator()){
Object poundlistObj=authorizeService.getCondition(new AuthorizeConditionModel(poundlistQueryWrapper,poundlistPagination.getMenuId(),"jg_poundlist"));
if (ObjectUtil.isEmpty(poundlistObj)){
return new ArrayList<>();
} else {
poundlistQueryWrapper = (QueryWrapper<PoundlistEntity>)poundlistObj;
poundlistNum++;
}
}
}
}
if(!isPc && appPermission){
if (!userProvider.get().getIsAdministrator()){
Object poundlistObj=authorizeService.getCondition(new AuthorizeConditionModel(poundlistQueryWrapper,poundlistPagination.getMenuId(),"jg_poundlist"));
if (ObjectUtil.isEmpty(poundlistObj)){
return new ArrayList<>();
} else {
poundlistQueryWrapper = (QueryWrapper<PoundlistEntity>)poundlistObj;
poundlistNum++;
}
if(!isPc && appPermission){
if (!userProvider.get().getIsAdministrator()){
Object poundlistObj=authorizeService.getCondition(new AuthorizeConditionModel(poundlistQueryWrapper,poundlistPagination.getMenuId(),"jg_poundlist"));
if (ObjectUtil.isEmpty(poundlistObj)){
return new ArrayList<>();
} else {
poundlistQueryWrapper = (QueryWrapper<PoundlistEntity>)poundlistObj;
poundlistNum++;
}
}
}
if(StringUtil.isNotEmpty(poundlistPagination.getPoundDate())){
}
}
if(StringUtil.isNotEmpty(poundlistPagination.getPoundDate())){
poundlistNum++;
List<String> PoundDateList = poundlistPagination.getPoundDate();
Long fir = Long.valueOf(PoundDateList.get(0));
Long sec = Long.valueOf(PoundDateList.get(1));
poundlistQueryWrapper.lambda().ge(PoundlistEntity::getPoundDate, new Date(fir))
.le(PoundlistEntity::getPoundDate, DateUtil.stringToDate(DateUtil.daFormatYmd(sec) + " 23:59:59"));
poundlistQueryWrapper.lambda().ge(PoundlistEntity::getPoundDate, new Date(fir))
.le(PoundlistEntity::getPoundDate, DateUtil.stringToDate(DateUtil.daFormatYmd(sec) + " 23:59:59"));
}
}
if(StringUtil.isNotEmpty(poundlistPagination.getPoundlistNo())){
if(StringUtil.isNotEmpty(poundlistPagination.getPoundlistNo())){
poundlistNum++;
poundlistQueryWrapper.lambda().like(PoundlistEntity::getPoundlistNo,poundlistPagination.getPoundlistNo());
}
}
if(AllIdList.size()>0){
poundlistQueryWrapper.lambda().in(PoundlistEntity::getId, AllIdList);
}
if(AllIdList.size()>0){
poundlistQueryWrapper.lambda().in(PoundlistEntity::getId, AllIdList);
}
//排序
if(StringUtil.isEmpty(poundlistPagination.getSidx())){
poundlistQueryWrapper.lambda().orderByDesc(PoundlistEntity::getId);
poundlistQueryWrapper.lambda().orderByDesc(PoundlistEntity::getId);
}else{
try {
String sidx = poundlistPagination.getSidx();
String sidx = poundlistPagination.getSidx();
PoundlistEntity poundlistEntity = new PoundlistEntity();
Field declaredField = poundlistEntity.getClass().getDeclaredField(sidx);
declaredField.setAccessible(true);
String value = declaredField.getAnnotation(TableField.class).value();
poundlistQueryWrapper="asc".equals(poundlistPagination.getSort().toLowerCase())?poundlistQueryWrapper.orderByAsc(value):poundlistQueryWrapper.orderByDesc(value);
Field declaredField = poundlistEntity.getClass().getDeclaredField(sidx);
declaredField.setAccessible(true);
String value = declaredField.getAnnotation(TableField.class).value();
poundlistQueryWrapper="asc".equals(poundlistPagination.getSort().toLowerCase())?poundlistQueryWrapper.orderByAsc(value):poundlistQueryWrapper.orderByDesc(value);
} catch (NoSuchFieldException e) {
e.printStackTrace();
}
@ -336,8 +336,8 @@ public class PoundlistServiceImpl extends ServiceImpl<PoundlistMapper, Poundlist
//销售毛利表
@Override
public List<PoundlistSEntity> qureylist(PoundlistSEntity poundlistSEntity) {
List<PoundlistSEntity> list= poundlistMapper.qureylist(poundlistSEntity);
return list;
List<PoundlistSEntity> list= poundlistMapper.qureylist(poundlistSEntity);
return list;
}
@Override

@ -35,6 +35,7 @@
</div>
</div>
<div class="import-main" v-show="active==2">
<p style="color: #950614">批量导入自动去重在合同档案中已经存在的合同数据</p>
<JNPF-table v-loading="listLoading" :data="list">
<el-table-column prop="contractCode" label="合同编码" width="150">

Loading…
Cancel
Save