变更
This commit is contained in:
+12
@@ -229,6 +229,18 @@ public class PaySpendingContractController extends JeroController<PaySpendingCon
|
||||
return Result.OK("删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "同步旧数据",operateType = 4)
|
||||
@ApiOperation(value="同步旧数据", notes="同步旧数据")
|
||||
@GetMapping(value = "/synContract")
|
||||
public Result<?> synContract() {
|
||||
paySpendingContractService.synContract();
|
||||
return Result.OK("同步成功!");
|
||||
}
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
|
||||
+15
-12
@@ -33,36 +33,36 @@ public interface IPaySpendingContractService extends IService<PaySpendingContrac
|
||||
* @Description 添加
|
||||
* @Author lqt
|
||||
* @Date 2021/9/7
|
||||
* @Param
|
||||
* @Return
|
||||
* @Exception
|
||||
* @Param
|
||||
* @Return
|
||||
* @Exception
|
||||
*/
|
||||
PaySpendingContract addPaySpendingContractInput(PaySpendingContractInput input);
|
||||
/**
|
||||
* @Description 编辑
|
||||
* @Author lqt
|
||||
* @Date 2021/9/7
|
||||
* @Param
|
||||
* @Return
|
||||
* @Exception
|
||||
* @Param
|
||||
* @Return
|
||||
* @Exception
|
||||
*/
|
||||
void editPayIncomeContractInput(PaySpendingContractInput input);
|
||||
/**
|
||||
* @Description 通过id删除
|
||||
* @Author lqt
|
||||
* @Date 2021/9/7
|
||||
* @Param
|
||||
* @Return
|
||||
* @Exception
|
||||
* @Param
|
||||
* @Return
|
||||
* @Exception
|
||||
*/
|
||||
void deletePaySpendingContractInputById(String id);
|
||||
/**
|
||||
* @Description 批量删除
|
||||
* @Author lqt
|
||||
* @Date 2021/9/7
|
||||
* @Param
|
||||
* @Return
|
||||
* @Exception
|
||||
* @Param
|
||||
* @Return
|
||||
* @Exception
|
||||
*/
|
||||
void deleteSpendingContractInputByIds(List<String> ids);
|
||||
/**
|
||||
@@ -110,4 +110,7 @@ public interface IPaySpendingContractService extends IService<PaySpendingContrac
|
||||
* @Exception
|
||||
*/
|
||||
void updateArchive(PaySpendingContractAudit paySpendingContractAudit);
|
||||
|
||||
void synContract();
|
||||
|
||||
}
|
||||
|
||||
+2
@@ -1163,6 +1163,8 @@ public class PayIncomeContractServiceImpl extends ServiceImpl<PayIncomeContractM
|
||||
LambdaUpdateWrapper<PayMailContract> updatePayMailContract = new LambdaUpdateWrapper<>();
|
||||
updatePayMailContract.eq(PayMailContract::getContractId,id);
|
||||
payMailContractService.remove(updatePayMailContract);
|
||||
//删除邮寄列表
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
+25
@@ -2,7 +2,9 @@ package com.jero.contract.service.impl;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
@@ -85,6 +87,7 @@ public class PaySpendingContractServiceImpl extends ServiceImpl<PaySpendingContr
|
||||
private SendMessageService sendMessageService;
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public IPage<PaySpendingContract> queryPageList(Page<PaySpendingContract> page, PaySpendingContract paySpendingContract, String startTime, String endTime,String chargeStatus) {
|
||||
return paySpendingContractMapper.queryPageList(page,paySpendingContract,startTime,endTime,chargeStatus);
|
||||
@@ -324,6 +327,7 @@ public class PaySpendingContractServiceImpl extends ServiceImpl<PaySpendingContr
|
||||
LambdaUpdateWrapper<PaySpendingContractInstallment> updatePaySpendingContractInstallment = new LambdaUpdateWrapper<>();
|
||||
updatePaySpendingContractInstallment.eq(PaySpendingContractInstallment::getContractId,id);
|
||||
paySpendingContractInstallmentService.remove(updatePaySpendingContractInstallment);
|
||||
payMailContractService.remove(new LambdaQueryWrapper<PayMailContract>().eq(PayMailContract::getContractId,id));
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -353,6 +357,7 @@ public class PaySpendingContractServiceImpl extends ServiceImpl<PaySpendingContr
|
||||
LambdaUpdateWrapper<PaySpendingContractInstallment> updatePaySpendingContractInstallment = new LambdaUpdateWrapper<>();
|
||||
updatePaySpendingContractInstallment.in(PaySpendingContractInstallment::getContractId,ids);
|
||||
paySpendingContractInstallmentService.remove(updatePaySpendingContractInstallment);
|
||||
payMailContractService.remove(new LambdaQueryWrapper<PayMailContract>().in(PayMailContract::getContractId,ids));
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -792,6 +797,26 @@ public class PaySpendingContractServiceImpl extends ServiceImpl<PaySpendingContr
|
||||
paySpendingContractAuditService.save(paySpendingContractAudit);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void synContract() {
|
||||
payMailContractService.update(new PayMailContract().setContractType(2),new UpdateWrapper<PayMailContract>().isNull("contract_type"));
|
||||
payMailContractService.del();
|
||||
List<PaySpendingContract> list = paySpendingContractService.list(null);
|
||||
ArrayList<PayMailContract> arrayList = new ArrayList<>();
|
||||
for(PaySpendingContract paySpendingContract:list){
|
||||
PayMailContract payMailContract = new PayMailContract();
|
||||
payMailContract.setContractId(paySpendingContract.getId());
|
||||
payMailContract.setPostStatus(PayIncomeContractCommon.POST_STATUS0);
|
||||
// payMailContract.setMobile(PasswordUtil.encrypt(paySpendingContract.getPhone()));
|
||||
// payMailContract.setEmail("");
|
||||
payMailContract.setLiaisonMan(paySpendingContract.getSignedContactsTemporaryName());
|
||||
payMailContract.setContractType(PayIncomeContractCommon.CONTRACT_TYPE1);
|
||||
arrayList.add(payMailContract);
|
||||
}
|
||||
payMailContractService.saveBatch(arrayList);
|
||||
|
||||
}
|
||||
|
||||
|
||||
private PaySpendingContract setPaySpendingContractExcel(Map<Integer,String> map,Map<String, String> mapOpening,Map<String, String> mapPack,
|
||||
int n,StringBuilder sb){
|
||||
|
||||
+10
-9
@@ -228,15 +228,16 @@ public class PayCaseCommitteeSubitemController extends JeroController<PayCaseCom
|
||||
@NotNull
|
||||
private ModelAndView getModelAndView(List<ChooseExcelWorkingGroup> list) {
|
||||
if (!CollectionUtils.isEmpty(list)) {
|
||||
try {
|
||||
list.forEach(p -> {
|
||||
if (!org.apache.commons.lang3.StringUtils.isBlank(p.getPhone())) {
|
||||
p.setPhone(PasswordUtil.decrypt(p.getPhone()));
|
||||
}
|
||||
});
|
||||
} catch (Exception e) {
|
||||
log.error("手机号解密异常!", e);
|
||||
}
|
||||
list.forEach(p -> {
|
||||
try {
|
||||
if (!org.apache.commons.lang3.StringUtils.isBlank(p.getPhone())) {
|
||||
p.setPhone(PasswordUtil.decrypt(p.getPhone()));
|
||||
}
|
||||
} catch (Exception e) {
|
||||
log.error("手机号解密异常!", e);
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
return AmountUtil.exportListXls(list, ChooseExcelWorkingGroup.class,"分标委表导出");
|
||||
|
||||
+7
-6
@@ -288,15 +288,16 @@ public class PayCaseCouncilSubitemController extends JeroController<PayCaseCounc
|
||||
@NotNull
|
||||
private ModelAndView getModelAndView(List<ChooseExcelCouncil> list) {
|
||||
if (!CollectionUtils.isEmpty(list)) {
|
||||
try {
|
||||
list.forEach(p -> {
|
||||
list.forEach(p -> {
|
||||
try {
|
||||
if (!org.apache.commons.lang3.StringUtils.isBlank(p.getPhone())) {
|
||||
p.setPhone(PasswordUtil.decrypt(p.getPhone()));
|
||||
}
|
||||
});
|
||||
} catch (Exception e) {
|
||||
log.error("手机号解密异常!", e);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
log.error("手机号解密异常!", e);
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
return AmountUtil.exportListXls(list, ChooseExcelCouncil.class,"理事会表导出");
|
||||
|
||||
+8
-6
@@ -709,20 +709,22 @@ public class PayMailBillController extends JeroController<PayMailBill, IPayMailB
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private void getMobile(List<PayMailBill> list) {
|
||||
if (!CollectionUtils.isEmpty(list)) {
|
||||
try {
|
||||
list.forEach(p -> {
|
||||
list.forEach(p -> {
|
||||
try {
|
||||
if (!org.apache.commons.lang3.StringUtils.isBlank(p.getContactMobile())) {
|
||||
p.setContactMobile(PasswordUtil.decrypt(p.getContactMobile()));
|
||||
}
|
||||
if (!org.apache.commons.lang3.StringUtils.isBlank(p.getPrincipalPhone())) {
|
||||
p.setPrincipalPhone(PasswordUtil.decrypt(p.getPrincipalPhone()));
|
||||
}
|
||||
});
|
||||
} catch (Exception e) {
|
||||
log.error("手机号解密异常!", e);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
log.error("手机号解密异常!", e);
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+21
-18
@@ -75,18 +75,19 @@ public class PayMailContractController extends JeroController<PayMailContract, I
|
||||
Page<PayMailContracrList> page = new Page<>(pageNo, pageSize);
|
||||
IPage<PayMailContracrList> pageList = payMailContractService.pageContract(page, payMailContracrList);
|
||||
if (!CollectionUtils.isEmpty(pageList.getRecords())) {
|
||||
try {
|
||||
pageList.getRecords().forEach(p -> {
|
||||
pageList.getRecords().forEach(p -> {
|
||||
try {
|
||||
if (!org.apache.commons.lang3.StringUtils.isBlank(p.getMobile())) {
|
||||
p.setMobile(PasswordUtil.decrypt(p.getMobile()));
|
||||
}
|
||||
String principalId = p.getPrincipalId();
|
||||
SysUser sysUser = sysUserService.getById(principalId);
|
||||
p.setPrincipalPhone(PasswordUtil.decrypt(sysUser.getPhone()));
|
||||
});
|
||||
} catch (Exception e) {
|
||||
log.error("手机号解密异常!", e);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
log.error("手机号解密异常!", e);
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
@@ -269,15 +270,16 @@ public class PayMailContractController extends JeroController<PayMailContract, I
|
||||
payMailContracrList.setSignedCompanyTemporaryName(oConvertUtils.replaceAllPercent(payMailContracrList.getSignedCompanyTemporaryName()));
|
||||
List<PayMailContracrList> pageList = payMailContractService.pageContractTwo(payMailContracrList);
|
||||
if (!CollectionUtils.isEmpty(pageList)) {
|
||||
try {
|
||||
pageList.forEach(p -> {
|
||||
pageList.forEach(p -> {
|
||||
try {
|
||||
if (!org.apache.commons.lang3.StringUtils.isBlank(p.getMobile())) {
|
||||
p.setMobile(PasswordUtil.decrypt(p.getMobile()));
|
||||
}
|
||||
});
|
||||
} catch (Exception e) {
|
||||
log.error("手机号解密异常!", e);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
log.error("手机号解密异常!", e);
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
return AmountUtil.exportListXls(pageList, PayMailContracrList.class, "邮寄合同");
|
||||
} else {
|
||||
@@ -286,15 +288,16 @@ public class PayMailContractController extends JeroController<PayMailContract, I
|
||||
List<PayMailContracrList> list = payMailContractService.getOneExcel(strings);
|
||||
|
||||
if (!CollectionUtils.isEmpty(list)) {
|
||||
try {
|
||||
list.forEach(p -> {
|
||||
list.forEach(p -> {
|
||||
try {
|
||||
if (!org.apache.commons.lang3.StringUtils.isBlank(p.getMobile())) {
|
||||
p.setMobile(PasswordUtil.decrypt(p.getMobile()));
|
||||
}
|
||||
});
|
||||
} catch (Exception e) {
|
||||
log.error("手机号解密异常!", e);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
log.error("手机号解密异常!", e);
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
return AmountUtil.exportListXls(list, PayMailContracrList.class, "邮寄合同");
|
||||
}
|
||||
|
||||
+2
@@ -31,4 +31,6 @@ public interface PayMailContractMapper extends BaseMapper<PayMailContract> {
|
||||
|
||||
PayMailContracrList checkOne(@Param("id") String id);
|
||||
|
||||
void del();
|
||||
|
||||
}
|
||||
|
||||
+7
-4
@@ -1,6 +1,9 @@
|
||||
<?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="com.jero.mail.mapper.PayMailContractMapper">
|
||||
<delete id="del">
|
||||
delete from pay_mail_contract where contract_id not in (select id from pay_income_contract) and contract_type='2'
|
||||
</delete>
|
||||
<select id="pageContract" resultType="com.jero.mail.entity.PayMailContracrList">
|
||||
select * from(
|
||||
SELECT
|
||||
@@ -8,8 +11,8 @@ select * from(
|
||||
pc.post_status as postStatus,
|
||||
pc.send_method as sendMethod,
|
||||
pc.post_no as postNo,
|
||||
pc.liaison_man as liaisonMan,
|
||||
pc.mobile,
|
||||
pic.signed_contacts_temporary_name as liaisonMan,
|
||||
pcmt.phone as mobile,
|
||||
pc.remark,
|
||||
pc.mailer,
|
||||
pc.send_date as sendDate,
|
||||
@@ -46,8 +49,8 @@ union all
|
||||
pc.post_status as postStatus,
|
||||
pc.send_method as sendMethod,
|
||||
pc.post_no as postNo,
|
||||
pc.liaison_man as liaisonMan,
|
||||
pc.mobile,
|
||||
psc.signed_contacts_temporary_name as liaisonMan,
|
||||
psc.phone as mobile,
|
||||
pc.remark,
|
||||
pc.mailer,
|
||||
pc.send_date as sendDate,
|
||||
|
||||
+2
-2
@@ -19,8 +19,6 @@ import java.util.List;
|
||||
*/
|
||||
public interface IPayMailContractService extends IService<PayMailContract> {
|
||||
|
||||
|
||||
|
||||
IPage<PayMailContracrList> pageContract(Page<PayMailContracrList> page, PayMailContracrList payMailContracrList);
|
||||
|
||||
List<PayMailContracrList> pageContractExcel(QueryWrapper<PayMailContracrList> queryWrapper);
|
||||
@@ -32,4 +30,6 @@ public interface IPayMailContractService extends IService<PayMailContract> {
|
||||
PayMailContracrList checkOne(String id);
|
||||
|
||||
|
||||
void del();
|
||||
|
||||
}
|
||||
|
||||
+5
@@ -52,5 +52,10 @@ public class PayMailContractServiceImpl extends ServiceImpl<PayMailContractMappe
|
||||
return payMailContractMapper.checkOne(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void del() {
|
||||
payMailContractMapper.del();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user