|
|
@ -30,6 +30,9 @@ import jnpf.util.*;
|
|
|
|
import java.util.*;
|
|
|
|
import java.util.*;
|
|
|
|
import jnpf.base.UserInfo;
|
|
|
|
import jnpf.base.UserInfo;
|
|
|
|
import jnpf.permission.entity.UserEntity;
|
|
|
|
import jnpf.permission.entity.UserEntity;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* Cwaccount
|
|
|
|
* Cwaccount
|
|
|
@ -41,7 +44,7 @@ import jnpf.permission.entity.UserEntity;
|
|
|
|
@Service
|
|
|
|
@Service
|
|
|
|
public class CwaccountServiceImpl extends ServiceImpl<CwaccountMapper, CwaccountEntity> implements CwaccountService{
|
|
|
|
public class CwaccountServiceImpl extends ServiceImpl<CwaccountMapper, CwaccountEntity> implements CwaccountService{
|
|
|
|
@Autowired
|
|
|
|
@Autowired
|
|
|
|
private GeneraterSwapUtil generaterSwapUtil;
|
|
|
|
private GeneraterSwapUtil2 generaterSwapUtil;
|
|
|
|
|
|
|
|
|
|
|
|
@Autowired
|
|
|
|
@Autowired
|
|
|
|
private UserProvider userProvider;
|
|
|
|
private UserProvider userProvider;
|
|
|
@ -56,6 +59,8 @@ public class CwaccountServiceImpl extends ServiceImpl<CwaccountMapper, Cwaccount
|
|
|
|
private CwaccountvoucherService cwaccountvoucherService;
|
|
|
|
private CwaccountvoucherService cwaccountvoucherService;
|
|
|
|
@Autowired
|
|
|
|
@Autowired
|
|
|
|
private CwaccountsummaryService cwaccountsummaryService;
|
|
|
|
private CwaccountsummaryService cwaccountsummaryService;
|
|
|
|
|
|
|
|
@Resource
|
|
|
|
|
|
|
|
private CwaccountMapper cwaccountMapper;
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public List<CwaccountEntity> getList(CwaccountPagination cwaccountPagination){
|
|
|
|
public List<CwaccountEntity> getList(CwaccountPagination cwaccountPagination){
|
|
|
|
return getTypeList(cwaccountPagination,cwaccountPagination.getDataType());
|
|
|
|
return getTypeList(cwaccountPagination,cwaccountPagination.getDataType());
|
|
|
@ -349,13 +354,23 @@ public class CwaccountServiceImpl extends ServiceImpl<CwaccountMapper, Cwaccount
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if(isPc){
|
|
|
|
if(isPc){
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(ObjectUtil.isNotEmpty(cwaccountPagination.getSettlementSum())){
|
|
|
|
|
|
|
|
cwaccountNum++;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
String value = cwaccountPagination.getCode() instanceof List ?
|
|
|
|
|
|
|
|
JsonUtil.getObjectToString(cwaccountPagination.getSettlementSum()) :
|
|
|
|
|
|
|
|
String.valueOf(cwaccountPagination.getSettlementSum());
|
|
|
|
|
|
|
|
cwaccountQueryWrapper.like("b.settlement_sum",value);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if(ObjectUtil.isNotEmpty(cwaccountPagination.getCode())){
|
|
|
|
if(ObjectUtil.isNotEmpty(cwaccountPagination.getCode())){
|
|
|
|
cwaccountNum++;
|
|
|
|
cwaccountNum++;
|
|
|
|
|
|
|
|
|
|
|
|
String value = cwaccountPagination.getCode() instanceof List ?
|
|
|
|
String value = cwaccountPagination.getCode() instanceof List ?
|
|
|
|
JsonUtil.getObjectToString(cwaccountPagination.getCode()) :
|
|
|
|
JsonUtil.getObjectToString(cwaccountPagination.getCode()) :
|
|
|
|
String.valueOf(cwaccountPagination.getCode());
|
|
|
|
String.valueOf(cwaccountPagination.getCode());
|
|
|
|
cwaccountQueryWrapper.lambda().like(CwaccountEntity::getCode,value);
|
|
|
|
cwaccountQueryWrapper.like("a.code",value);
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -366,8 +381,8 @@ public class CwaccountServiceImpl extends ServiceImpl<CwaccountMapper, Cwaccount
|
|
|
|
Long fir = Long.valueOf(String.valueOf(PreparationTimeList.get(0)));
|
|
|
|
Long fir = Long.valueOf(String.valueOf(PreparationTimeList.get(0)));
|
|
|
|
Long sec = Long.valueOf(String.valueOf(PreparationTimeList.get(1)));
|
|
|
|
Long sec = Long.valueOf(String.valueOf(PreparationTimeList.get(1)));
|
|
|
|
|
|
|
|
|
|
|
|
cwaccountQueryWrapper.ge("f_creator_time", new Date(fir))
|
|
|
|
cwaccountQueryWrapper.ge("a.f_creator_time", new Date(fir))
|
|
|
|
.le("f_creator_time", DateUtil.stringToDate(DateUtil.daFormatYmd(sec) + " 23:59:59"));
|
|
|
|
.le("a.f_creator_time", DateUtil.stringToDate(DateUtil.daFormatYmd(sec) + " 23:59:59"));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -375,31 +390,31 @@ public class CwaccountServiceImpl extends ServiceImpl<CwaccountMapper, Cwaccount
|
|
|
|
if(ObjectUtil.isNotEmpty(cwaccountPagination.getType())){
|
|
|
|
if(ObjectUtil.isNotEmpty(cwaccountPagination.getType())){
|
|
|
|
cwaccountNum++;
|
|
|
|
cwaccountNum++;
|
|
|
|
|
|
|
|
|
|
|
|
cwaccountQueryWrapper.lambda().eq(CwaccountEntity::getType,cwaccountPagination.getType());
|
|
|
|
cwaccountQueryWrapper.eq("a.type",cwaccountPagination.getType());
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if(ObjectUtil.isNotEmpty(cwaccountPagination.getBusinessType())){
|
|
|
|
if(ObjectUtil.isNotEmpty(cwaccountPagination.getBusinessType())){
|
|
|
|
cwaccountNum++;
|
|
|
|
cwaccountNum++;
|
|
|
|
|
|
|
|
|
|
|
|
cwaccountQueryWrapper.lambda().eq(CwaccountEntity::getBusinessType,cwaccountPagination.getBusinessType());
|
|
|
|
cwaccountQueryWrapper.eq("a.business_type",cwaccountPagination.getBusinessType());
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if(cwaccountPagination.getContractCodeList() != null && cwaccountPagination.getContractCodeList().size() > 0){
|
|
|
|
if(cwaccountPagination.getContractCodeList() != null && cwaccountPagination.getContractCodeList().size() > 0){
|
|
|
|
cwaccountNum++;
|
|
|
|
cwaccountNum++;
|
|
|
|
|
|
|
|
|
|
|
|
cwaccountQueryWrapper.lambda().in(CwaccountEntity::getContractCode,cwaccountPagination.getContractCodeList());
|
|
|
|
cwaccountQueryWrapper.in("a.contract_code",cwaccountPagination.getContractCodeList());
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if(ObjectUtil.isNotEmpty(cwaccountPagination.getAccountState())){
|
|
|
|
if(ObjectUtil.isNotEmpty(cwaccountPagination.getAccountState())){
|
|
|
|
cwaccountNum++;
|
|
|
|
cwaccountNum++;
|
|
|
|
|
|
|
|
|
|
|
|
cwaccountQueryWrapper.lambda().eq(CwaccountEntity::getAccountState,cwaccountPagination.getAccountState());
|
|
|
|
cwaccountQueryWrapper.eq("a.account_state",cwaccountPagination.getAccountState());
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if(cwaccountPagination.getExcludeIdList() != null && cwaccountPagination.getExcludeIdList().size() > 0){
|
|
|
|
if(cwaccountPagination.getExcludeIdList() != null && cwaccountPagination.getExcludeIdList().size() > 0){
|
|
|
|
cwaccountNum++;
|
|
|
|
cwaccountNum++;
|
|
|
|
|
|
|
|
|
|
|
|
cwaccountQueryWrapper.lambda().notIn(CwaccountEntity::getId,cwaccountPagination.getExcludeIdList());
|
|
|
|
cwaccountQueryWrapper.notIn("a.id",cwaccountPagination.getExcludeIdList());
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -409,7 +424,7 @@ public class CwaccountServiceImpl extends ServiceImpl<CwaccountMapper, Cwaccount
|
|
|
|
String value = cwaccountPagination.getAccountSubjectName() instanceof List ?
|
|
|
|
String value = cwaccountPagination.getAccountSubjectName() instanceof List ?
|
|
|
|
JsonUtil.getObjectToString(cwaccountPagination.getAccountSubjectName()) :
|
|
|
|
JsonUtil.getObjectToString(cwaccountPagination.getAccountSubjectName()) :
|
|
|
|
String.valueOf(cwaccountPagination.getAccountSubjectName());
|
|
|
|
String.valueOf(cwaccountPagination.getAccountSubjectName());
|
|
|
|
cwaccountQueryWrapper.lambda().like(CwaccountEntity::getAccountSubjectName,value);
|
|
|
|
cwaccountQueryWrapper.like("a.account_subject_name",value);
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -419,7 +434,7 @@ public class CwaccountServiceImpl extends ServiceImpl<CwaccountMapper, Cwaccount
|
|
|
|
String value = cwaccountPagination.getAccountSubjectType() instanceof List ?
|
|
|
|
String value = cwaccountPagination.getAccountSubjectType() instanceof List ?
|
|
|
|
JsonUtil.getObjectToString(cwaccountPagination.getAccountSubjectType()) :
|
|
|
|
JsonUtil.getObjectToString(cwaccountPagination.getAccountSubjectType()) :
|
|
|
|
String.valueOf(cwaccountPagination.getAccountSubjectType());
|
|
|
|
String.valueOf(cwaccountPagination.getAccountSubjectType());
|
|
|
|
cwaccountQueryWrapper.lambda().like(CwaccountEntity::getAccountSubjectType,value);
|
|
|
|
cwaccountQueryWrapper.like("a.account_subject_type",value);
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -474,7 +489,7 @@ public class CwaccountServiceImpl extends ServiceImpl<CwaccountMapper, Cwaccount
|
|
|
|
if (intersection.size()==0){
|
|
|
|
if (intersection.size()==0){
|
|
|
|
intersection.add("jnpfNullList");
|
|
|
|
intersection.add("jnpfNullList");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
cwaccountQueryWrapper.lambda().in(CwaccountEntity::getId, intersection);
|
|
|
|
cwaccountQueryWrapper.in("a.id", intersection);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
//是否有高级查询
|
|
|
|
//是否有高级查询
|
|
|
|
if (StringUtil.isNotEmpty(superOp)){
|
|
|
|
if (StringUtil.isNotEmpty(superOp)){
|
|
|
@ -482,7 +497,7 @@ public class CwaccountServiceImpl extends ServiceImpl<CwaccountMapper, Cwaccount
|
|
|
|
allSuperIDlist.add("jnpfNullList");
|
|
|
|
allSuperIDlist.add("jnpfNullList");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
List<String> finalAllSuperIDlist = allSuperIDlist;
|
|
|
|
List<String> finalAllSuperIDlist = allSuperIDlist;
|
|
|
|
cwaccountQueryWrapper.lambda().and(t->t.in(CwaccountEntity::getId, finalAllSuperIDlist));
|
|
|
|
cwaccountQueryWrapper.and(t->t.in("a.id", finalAllSuperIDlist));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
//是否有数据过滤查询
|
|
|
|
//是否有数据过滤查询
|
|
|
|
if (StringUtil.isNotEmpty(ruleOp)){
|
|
|
|
if (StringUtil.isNotEmpty(ruleOp)){
|
|
|
@ -490,14 +505,16 @@ public class CwaccountServiceImpl extends ServiceImpl<CwaccountMapper, Cwaccount
|
|
|
|
allRuleIDlist.add("jnpfNullList");
|
|
|
|
allRuleIDlist.add("jnpfNullList");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
List<String> finalAllRuleIDlist = allRuleIDlist;
|
|
|
|
List<String> finalAllRuleIDlist = allRuleIDlist;
|
|
|
|
cwaccountQueryWrapper.lambda().and(t->t.in(CwaccountEntity::getId, finalAllRuleIDlist));
|
|
|
|
cwaccountQueryWrapper.and(t->t.in("a.id", finalAllRuleIDlist));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
//假删除标志
|
|
|
|
//假删除标志
|
|
|
|
cwaccountQueryWrapper.lambda().isNull(CwaccountEntity::getDeleteMark);
|
|
|
|
// cwaccountQueryWrapper.lambda().isNull(CwaccountEntity::getDeleteMark);
|
|
|
|
|
|
|
|
cwaccountQueryWrapper.isNull("a.f_delete_mark");
|
|
|
|
//排序
|
|
|
|
//排序
|
|
|
|
if(StringUtil.isEmpty(cwaccountPagination.getSidx())){
|
|
|
|
if(StringUtil.isEmpty(cwaccountPagination.getSidx())){
|
|
|
|
cwaccountQueryWrapper.lambda().orderByDesc(CwaccountEntity::getCreatorTime);
|
|
|
|
// cwaccountQueryWrapper.lambda().orderByDesc(CwaccountEntity::getCreatorTime);
|
|
|
|
|
|
|
|
cwaccountPagination.setSidx("a.f_creator_time");
|
|
|
|
|
|
|
|
cwaccountPagination.setSort("DESC");
|
|
|
|
}else{
|
|
|
|
}else{
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
String sidx = cwaccountPagination.getSidx();
|
|
|
|
String sidx = cwaccountPagination.getSidx();
|
|
|
@ -506,7 +523,9 @@ public class CwaccountServiceImpl extends ServiceImpl<CwaccountMapper, Cwaccount
|
|
|
|
Field declaredField = cwaccountEntity.getClass().getDeclaredField(strs[0]);
|
|
|
|
Field declaredField = cwaccountEntity.getClass().getDeclaredField(strs[0]);
|
|
|
|
declaredField.setAccessible(true);
|
|
|
|
declaredField.setAccessible(true);
|
|
|
|
String value = declaredField.getAnnotation(TableField.class).value();
|
|
|
|
String value = declaredField.getAnnotation(TableField.class).value();
|
|
|
|
cwaccountQueryWrapper="asc".equals(cwaccountPagination.getSort().toLowerCase())?cwaccountQueryWrapper.orderByAsc(value):cwaccountQueryWrapper.orderByDesc(value);
|
|
|
|
// cwaccountQueryWrapper="asc".equals(cwaccountPagination.getSort().toLowerCase())?cwaccountQueryWrapper.orderByAsc(value):cwaccountQueryWrapper.orderByDesc(value);
|
|
|
|
|
|
|
|
cwaccountPagination.setSidx("a." + value);
|
|
|
|
|
|
|
|
|
|
|
|
} catch (NoSuchFieldException e) {
|
|
|
|
} catch (NoSuchFieldException e) {
|
|
|
|
e.printStackTrace();
|
|
|
|
e.printStackTrace();
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -516,9 +535,11 @@ public class CwaccountServiceImpl extends ServiceImpl<CwaccountMapper, Cwaccount
|
|
|
|
if((total>0 && AllIdList.size()>0) || total==0){
|
|
|
|
if((total>0 && AllIdList.size()>0) || total==0){
|
|
|
|
Page<CwaccountEntity> page=new Page<>(cwaccountPagination.getCurrentPage(), cwaccountPagination.getPageSize());
|
|
|
|
Page<CwaccountEntity> page=new Page<>(cwaccountPagination.getCurrentPage(), cwaccountPagination.getPageSize());
|
|
|
|
if("1".equals(cwaccountPagination.getQueryFlowTaskPass())){
|
|
|
|
if("1".equals(cwaccountPagination.getQueryFlowTaskPass())){
|
|
|
|
cwaccountQueryWrapper.inSql("id", "SELECT f_process_id FROM flow_task WHERE f_status = '2'");
|
|
|
|
cwaccountQueryWrapper.inSql("a.id", "SELECT f_process_id FROM flow_task WHERE f_status = '2'");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
IPage<CwaccountEntity> userIPage=this.page(page, cwaccountQueryWrapper);
|
|
|
|
// IPage<CwaccountEntity> userIPage=this.page(page, cwaccountQueryWrapper);
|
|
|
|
|
|
|
|
IPage<CwaccountEntity> userIPage = cwaccountMapper.queryCwaccount(page,cwaccountPagination,cwaccountQueryWrapper);
|
|
|
|
|
|
|
|
|
|
|
|
return cwaccountPagination.setData(userIPage.getRecords(),userIPage.getTotal());
|
|
|
|
return cwaccountPagination.setData(userIPage.getRecords(),userIPage.getTotal());
|
|
|
|
}else{
|
|
|
|
}else{
|
|
|
|
List<CwaccountEntity> list = new ArrayList();
|
|
|
|
List<CwaccountEntity> list = new ArrayList();
|
|
|
|