Merge remote-tracking branch 'origin/work_group_update'

# Conflicts:
#	db/2022-1-4变更.sql
#	jero-boot-incoming-payment/src/main/java/com/jero/project/controller/PayWorkingGroupSubItemController.java
This commit is contained in:
梁琦涛
2022-05-09 13:51:33 +08:00
31 changed files with 1397 additions and 692 deletions
+33 -1
View File
@@ -184,6 +184,38 @@ INSERT INTO `sys_dict` VALUES ('1509830472616779778', '合同类型', 'contract_
INSERT INTO `sys_dict_item` VALUES ('1509830576870400001', '1509830472616779778', '支出合同', '1', '', 1.00, 1, 'LKGLZ', '2022-04-01 17:50:35', NULL, NULL);
INSERT INTO `sys_dict_item` VALUES ('1509830618775691265', '1509830472616779778', '收入合同', '2', '', 1.00, 1, 'LKGLZ', '2022-04-01 17:50:45', NULL, NULL);
-- 2022-04-20 新增是否是内部企业
ALTER TABLE pay_company_management ADD COLUMN internal_enterprise VARCHAR(6) DEFAULT NULL COMMENT '是否内部企业';
INSERT INTO `sys_permission`(`id`, `parent_id`, `name`, `url`, `component`, `component_name`, `redirect`, `menu_type`, `perms`, `perms_type`, `sort_no`, `always_show`, `icon`, `is_route`, `is_leaf`, `keep_alive`, `hidden`, `description`, `create_by`, `create_time`, `update_by`, `update_time`, `del_flag`, `rule_flag`, `status`, `internal_or_external`) VALUES ('1516688284384772098', '1430376267109978113', '是否内部企业', NULL, NULL, NULL, NULL, 2, 'company:updateInternalEnterprise', '1', 1.00, 0, NULL, 1, 1, 0, 0, NULL, 'LKGLZ', '2022-04-20 16:00:40', NULL, NULL, 0, 0, '1', 0);
-- 2022-04-24 收入合同+支出合同查询邮寄详情按钮权限
INSERT INTO `income_payments`.`sys_permission`(`id`, `parent_id`, `name`, `url`, `component`, `component_name`, `redirect`, `menu_type`, `perms`, `perms_type`, `sort_no`, `always_show`, `icon`, `is_route`, `is_leaf`, `keep_alive`, `hidden`, `description`, `create_by`, `create_time`, `update_by`, `update_time`, `del_flag`, `rule_flag`, `status`, `internal_or_external`) VALUES ('1518071675121545217', '1433250634957398018', '查看邮寄详情', NULL, NULL, NULL, NULL, 2, 'revenueContract:mailDetail', '1', 1.00, 0, NULL, 1, 1, 0, 0, NULL, 'LKGLZ', '2022-04-24 11:37:46', NULL, NULL, 0, 0, '1', 0);
INSERT INTO `income_payments`.`sys_permission`(`id`, `parent_id`, `name`, `url`, `component`, `component_name`, `redirect`, `menu_type`, `perms`, `perms_type`, `sort_no`, `always_show`, `icon`, `is_route`, `is_leaf`, `keep_alive`, `hidden`, `description`, `create_by`, `create_time`, `update_by`, `update_time`, `del_flag`, `rule_flag`, `status`, `internal_or_external`) VALUES ('1518071807695106050', '1435135348211298306', '查看邮寄详情', NULL, NULL, NULL, NULL, 2, 'expenditureContract:mailDetail', '1', 1.00, 0, NULL, 1, 1, 0, 0, NULL, 'LKGLZ', '2022-04-24 11:38:18', NULL, NULL, 0, 0, '1', 0);
-- 2022-04-25 工作组成员单位3个联系人修改成多个联系人变更
DROP TABLE IF EXISTS `pay_working_group_subitem_contacts`;
CREATE TABLE `pay_working_group_subitem_contacts` (
`id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
`working_group_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '工作组id',
`working_group_sub_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '工作组成员id',
`contacts_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '企业联系人id',
`contacts_temporary_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '临时企业联系人id',
`contacts_temporary_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '临时企业联系人名称',
`remarks` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '联系人备注',
`order_num` int(3) NULL DEFAULT NULL COMMENT '序号',
`create_by` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建人',
`create_time` datetime(0) NULL DEFAULT NULL COMMENT '创建时间',
`update_by` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '更新人',
`update_time` datetime(0) NULL DEFAULT NULL COMMENT '更新时间',
PRIMARY KEY (`id`) USING BTREE,
INDEX `idx_wg_working_group_id`(`working_group_id`) USING BTREE,
INDEX `idx_wg_working_group_sub_id`(`working_group_sub_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '工作组成员企业联系人表' ROW_FORMAT = Dynamic;
insert into pay_working_group_subitem_contacts(id,working_group_id,working_group_sub_id,contacts_id,contacts_temporary_id,contacts_temporary_name,remarks,order_num,create_by,create_time) (select MD5(UUID()),working_group_id,id,contacts_id_one,contacts_temporary_id_one,contacts_temporary_name_one,remarks_one,1,create_by,create_time FROM pay_working_group_subitem where contacts_id_one is not null and contacts_id_one !='');
insert into pay_working_group_subitem_contacts(id,working_group_id,working_group_sub_id,contacts_id,contacts_temporary_id,contacts_temporary_name,remarks,order_num,create_by,create_time) (select MD5(UUID()),working_group_id,id,contacts_id_two,contacts_temporary_id_two,contacts_temporary_name_two,remarks_two,2,create_by,create_time FROM pay_working_group_subitem where contacts_id_two is not null and contacts_id_two !='');
insert into pay_working_group_subitem_contacts(id,working_group_id,working_group_sub_id,contacts_id,contacts_temporary_id,contacts_temporary_name,remarks,order_num,create_by,create_time) (select MD5(UUID()),working_group_id,id,contacts_id_three,contacts_temporary_id_three,contacts_temporary_name_three,remarks_three,3,create_by,create_time FROM pay_working_group_subitem where contacts_id_three is not null and contacts_id_three !='');
-- 20220426 分标委资料下载
INSERT INTO `sys_permission`(`id`, `parent_id`, `name`, `url`, `component`, `component_name`, `redirect`, `menu_type`, `perms`, `perms_type`, `sort_no`, `always_show`, `icon`, `is_route`, `is_leaf`, `keep_alive`, `hidden`, `description`, `create_by`, `create_time`, `update_by`, `update_time`, `del_flag`, `rule_flag`, `status`, `internal_or_external`) VALUES ('1518868037115293697', '1438322844248055809', '下载', NULL, NULL, NULL, NULL, 2, 'fileMaintenance:download', '1', 1.00, 0, NULL, 1, 1, 0, 0, NULL, 'LKGLZ', '2022-04-26 16:22:14', NULL, NULL, 0, 0, '1', 0);
INSERT INTO sys_role_permission ( id, role_id, permission_id, operate_date, operate_ip ) VALUES ( '1518880097958739969', 'f6817f48af4fb3af11b9e8bf182f618b', '1518868037115293697', '2022-04-26 17:10:09', '127.0.0.1' );
INSERT INTO sys_role_permission ( id, role_id, permission_id, operate_date, operate_ip ) VALUES ( '1518880097958739969', 'f6817f48af4fb3af11b9e8bf182f618b', '1518868037115293697', '2022-04-26 17:10:09', '127.0.0.1' );
@@ -178,9 +178,8 @@ public class ShiroConfig {
filterChainDefinitionMap.put("/company/payContactsManagement/queryWXByCompany","anon");
//企业端注册个人
filterChainDefinitionMap.put("/home/registerSelf", "anon");
// 判断当前企业是否是内部企业
filterChainDefinitionMap.put("/company/payCompanyManagement/getInternalEnterprise","anon");
// 添加自己的过滤器并且取名为jwt
Map<String, Filter> filterMap = new HashMap<String, Filter>(1);
@@ -33,7 +33,9 @@ import com.jero.project.common.PayProjectCommon;
import com.jero.project.entity.PayCommonProject;
import com.jero.project.entity.PayWorkingGroupDistributionRecord;
import com.jero.project.entity.PayWorkingGroupSubItem;
import com.jero.project.entity.PayWorkingGroupSubItemContacts;
import com.jero.project.service.IPayWorkingGroupDistributionRecordService;
import com.jero.project.service.IPayWorkingGroupSubItemContactsService;
import com.jero.project.service.IPayWorkingGroupSubItemService;
import com.jero.temporary.common.PayCompanyManagementTemporaryCommon;
import com.jero.temporary.entity.PayCompanyManagementTemporary;
@@ -82,6 +84,8 @@ public class ProjectDetailServiceImpl implements ProjectDetailService {
private ISysUserService sysUserService;
@Resource
private IPayWorkingGroupSubItemService payWorkingGroupSubItemService;
@Resource
private IPayWorkingGroupSubItemContactsService payWorkingGroupSubItemContactsService;
@Override
public ProjectDetailVO getProjectDetail(String projectId) {
@@ -229,75 +233,63 @@ public class ProjectDetailServiceImpl implements ProjectDetailService {
projectDetailVO.setBankAccountName(payCompanyManagementTemporary.getBankAccountName());
projectDetailVO.setBankAccount(payCompanyManagementTemporary.getBankAccount());
projectDetailVO.setOpeningBank(payCompanyManagementTemporary.getOpeningBank());
PayContactsManagementTemporary payContactsManagementTemporary = payContactsManagementTemporaryService.getById(payCommonProject.getContactsTemporaryId());
if(Objects.isNull(payContactsManagementTemporary)){
throw new JeroBootException("联系人不存在!");
}
projectDetailVO.setName(payContactsManagementTemporary.getName());
projectDetailVO.setGender(payContactsManagementTemporary.getGender());
if(!Objects.isNull(payContactsManagementTemporary.getGender())){
projectDetailVO.setGender_dictText(sysBaseAPI.translateDict("sex",String.valueOf(payContactsManagementTemporary.getGender())));
}
projectDetailVO.setPost(payContactsManagementTemporary.getPost());
if(!StringUtils.isBlank(payContactsManagementTemporary.getPhone())){
projectDetailVO.setPhone(PasswordUtil.decrypt(payContactsManagementTemporary.getPhone()));
}
if(!StringUtils.isBlank(payContactsManagementTemporary.getEmail())){
projectDetailVO.setEmail(PasswordUtil.decrypt(payContactsManagementTemporary.getEmail()));
}
projectDetailVO.setPostalCodeContacts(payContactsManagementTemporary.getPostalCode());
projectDetailVO.setContactAddress(payContactsManagementTemporary.getContactAddress());
// 工作组 添加企业联系人2,联系人3
// 工作组 添加企业联系人
if(Objects.equals(String.valueOf(payCommonProject.getProjectType()), ProjectCommon.PROJECT_TYPE2)){
PayWorkingGroupSubItem payWorkingGroupSubItem = payWorkingGroupSubItemService.getById(projectId);
if(Objects.isNull(payWorkingGroupSubItem)){
throw new JeroBootException("项目不存在!");
}
projectDetailVO.setRemarksOne(payWorkingGroupSubItem.getRemarksOne());
if(!StringUtils.isEmpty(payWorkingGroupSubItem.getContactsIdTwo())){
projectDetailVO.setRemarksTwo(payWorkingGroupSubItem.getRemarksTwo());
PayContactsManagementTemporary payContactsManagementTemporary2 = payContactsManagementTemporaryService.getById(payWorkingGroupSubItem.getContactsTemporaryIdTwo());
if(Objects.isNull(payContactsManagementTemporary2)){
throw new JeroBootException("联系人2不存在!");
LambdaQueryWrapper<PayWorkingGroupSubItemContacts> queryPayWorkingGroupSubItemContacts = new LambdaQueryWrapper<>();
queryPayWorkingGroupSubItemContacts.in(PayWorkingGroupSubItemContacts::getWorkingGroupSubId,projectId);
queryPayWorkingGroupSubItemContacts.orderByAsc(PayWorkingGroupSubItemContacts::getOrderNum);
List<PayWorkingGroupSubItemContacts> listPayWorkingGroupSubItemContacts = payWorkingGroupSubItemContactsService.list(queryPayWorkingGroupSubItemContacts);
if(!CollectionUtils.isEmpty(listPayWorkingGroupSubItemContacts)){
List<String> listIds = listPayWorkingGroupSubItemContacts.stream().map(PayWorkingGroupSubItemContacts::getContactsTemporaryId).collect(Collectors.toList());
List<PayContactsManagementTemporary> payContactsManagementTemporaryList = payContactsManagementTemporaryService.listByIds(listIds);
if(!CollectionUtils.isEmpty(payContactsManagementTemporaryList)){
listPayWorkingGroupSubItemContacts.forEach(p->{
List<PayContactsManagementTemporary> listNew = payContactsManagementTemporaryList.stream().filter(o->Objects.equals(o.getId(),p.getContactsTemporaryId())).collect(Collectors.toList());
if(CollectionUtils.isEmpty(listNew)){
return;
}
PayContactsManagementTemporary payContactsManagementTemporary = listNew.get(0);
p.setGender(payContactsManagementTemporary.getGender());
if(!Objects.isNull(payContactsManagementTemporary.getGender())){
p.setGender_dictText(sysBaseAPI.translateDict("sex",String.valueOf(payContactsManagementTemporary.getGender())));
}
p.setPost(payContactsManagementTemporary.getPost());
if(!StringUtils.isBlank(payContactsManagementTemporary.getPhone())){
p.setPhone(PasswordUtil.decrypt(payContactsManagementTemporary.getPhone()));
}
if(!StringUtils.isBlank(payContactsManagementTemporary.getEmail())){
p.setEmail(PasswordUtil.decrypt(payContactsManagementTemporary.getEmail()));
}
p.setPostalCodeContacts(payContactsManagementTemporary.getPostalCode());
p.setContactAddress(payContactsManagementTemporary.getContactAddress());
});
projectDetailVO.setPayWorkingGroupSubItemContactsList(listPayWorkingGroupSubItemContacts);
}
projectDetailVO.setNameTwo(payContactsManagementTemporary2.getName());
projectDetailVO.setGenderTwo(payContactsManagementTemporary2.getGender());
if(!Objects.isNull(payContactsManagementTemporary2.getGender())){
projectDetailVO.setGenderTwo_dictText(sysBaseAPI.translateDict("sex",String.valueOf(payContactsManagementTemporary.getGender())));
}
projectDetailVO.setPostTwo(payContactsManagementTemporary2.getPost());
if(!StringUtils.isBlank(payContactsManagementTemporary2.getPhone())){
projectDetailVO.setPhoneTwo(PasswordUtil.decrypt(payContactsManagementTemporary2.getPhone()));
}
if(!StringUtils.isBlank(payContactsManagementTemporary2.getEmail())){
projectDetailVO.setEmailTwo(PasswordUtil.decrypt(payContactsManagementTemporary2.getEmail()));
}
projectDetailVO.setPostalCodeContactsTwo(payContactsManagementTemporary2.getPostalCode());
projectDetailVO.setContactAddressTwo(payContactsManagementTemporary2.getContactAddress());
}
if(!StringUtils.isEmpty(payWorkingGroupSubItem.getContactsIdThree())){
projectDetailVO.setRemarksThree(payWorkingGroupSubItem.getRemarksThree());
PayContactsManagementTemporary payContactsManagementTemporary3 = payContactsManagementTemporaryService.getById(payWorkingGroupSubItem.getContactsTemporaryIdThree());
if(Objects.isNull(payContactsManagementTemporary3)){
throw new JeroBootException("联系人3不存在!");
}
projectDetailVO.setNameThree(payContactsManagementTemporary3.getName());
projectDetailVO.setGenderThree(payContactsManagementTemporary3.getGender());
if(!Objects.isNull(payContactsManagementTemporary3.getGender())){
projectDetailVO.setGenderThree_dictText(sysBaseAPI.translateDict("sex",String.valueOf(payContactsManagementTemporary3.getGender())));
}
projectDetailVO.setPostThree(payContactsManagementTemporary3.getPost());
if(!StringUtils.isBlank(payContactsManagementTemporary3.getPhone())){
projectDetailVO.setPhoneThree(PasswordUtil.decrypt(payContactsManagementTemporary3.getPhone()));
}
if(!StringUtils.isBlank(payContactsManagementTemporary3.getEmail())){
projectDetailVO.setEmailThree(PasswordUtil.decrypt(payContactsManagementTemporary3.getEmail()));
}
projectDetailVO.setPostalCodeContactsThree(payContactsManagementTemporary3.getPostalCode());
projectDetailVO.setContactAddressThree(payContactsManagementTemporary3.getContactAddress());
}else {
PayContactsManagementTemporary payContactsManagementTemporary = payContactsManagementTemporaryService.getById(payCommonProject.getContactsTemporaryId());
if(Objects.isNull(payContactsManagementTemporary)){
throw new JeroBootException("联系人不存在!");
}
projectDetailVO.setName(payContactsManagementTemporary.getName());
projectDetailVO.setGender(payContactsManagementTemporary.getGender());
if(!Objects.isNull(payContactsManagementTemporary.getGender())){
projectDetailVO.setGender_dictText(sysBaseAPI.translateDict("sex",String.valueOf(payContactsManagementTemporary.getGender())));
}
projectDetailVO.setPost(payContactsManagementTemporary.getPost());
if(!StringUtils.isBlank(payContactsManagementTemporary.getPhone())){
projectDetailVO.setPhone(PasswordUtil.decrypt(payContactsManagementTemporary.getPhone()));
}
if(!StringUtils.isBlank(payContactsManagementTemporary.getEmail())){
projectDetailVO.setEmail(PasswordUtil.decrypt(payContactsManagementTemporary.getEmail()));
}
projectDetailVO.setPostalCodeContacts(payContactsManagementTemporary.getPostalCode());
projectDetailVO.setContactAddress(payContactsManagementTemporary.getContactAddress());
}
}
// 到账信息
@@ -1,15 +1,11 @@
package com.jero.common.vo;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.jero.mail.entity.PayMailBill;
import com.jero.payment.entity.PayPaymentRecord;
import com.jero.project.entity.PayWorkingGroupSubItemContacts;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.jeecgframework.poi.excel.annotation.Excel;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.Pattern;
import javax.validation.constraints.Size;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.List;
@@ -266,4 +262,10 @@ public class ProjectDetailVO implements Serializable {
@ApiModelProperty(value = "开票邮寄记录")
private List<PayMailBillVO> mailBill;
/**
* 工作组企业联系人列表
*/
@ApiModelProperty(value = "工作组企业联系人列表")
private List<PayWorkingGroupSubItemContacts> payWorkingGroupSubItemContactsList;
}
@@ -278,6 +278,7 @@ public class PayCompanyManagementController extends JeroController<PayCompanyMan
@PostMapping(value = "/add")
@Transactional
public Result<?> add(@RequestBody PayCompanyManagement payCompanyManagement) {
payCompanyManagement.setInternalEnterprise("false");//是否内部企业
if(StringUtils.isEmpty(payCompanyManagement.getCompanyPhone())){
payCompanyManagement.setCompanyPhone(null);
}
@@ -389,6 +390,26 @@ public class PayCompanyManagementController extends JeroController<PayCompanyMan
payCompanyManagementService.edit(payCompanyManagement);
return Result.OK("编辑成功!");
}
@AutoLog(value = "企业管理-更改是否内部企业",operateType = 3)
@RequiresPermissions("company:updateInternalEnterprise")
@ApiOperation(value="企业管理-更改是否内部企业", notes="企业管理-更改是否内部企业")
@PostMapping(value = "/updateInternalEnterprise")
public Result<?> updateInternalEnterprise(@RequestBody PayCompanyManagement payCompanyManagement) {
payCompanyManagementService.updateById(payCompanyManagement);
return Result.OK("成功!");
}
@ApiOperation(value="企业管理-查看是否内部企业", notes="企业管理-查看是否内部企业")
@GetMapping(value = "/getInternalEnterprise")
public Result<?> getInternalEnterprise(String id) {
PayCompanyManagement pcm = payCompanyManagementService.getById(id);
if(StringUtils.isBlank(pcm.getInternalEnterprise())){
pcm.setInternalEnterprise("false");
}
return Result.OK(pcm.getInternalEnterprise());
}
/**
* 确认
*
@@ -761,6 +782,11 @@ public class PayCompanyManagementController extends JeroController<PayCompanyMan
if (!StringUtils.isBlank(p.getCompanyPhone())){
p.setCompanyPhone(PasswordUtil.decrypt(p.getCompanyPhone()));
}
if("true".equals(p.getInternalEnterprise())){
p.setInternalEnterprise("");
}else if("false".equals(p.getInternalEnterprise())){
p.setInternalEnterprise("");
}
});
}
// Step.3 AutoPoi 导出Excel
@@ -867,6 +893,17 @@ public class PayCompanyManagementController extends JeroController<PayCompanyMan
if(!StringUtils.isBlank(s)){
msg.append(s);
}
if (!StringUtils.isBlank(p.getInternalEnterprise())){
if("".equals(p.getInternalEnterprise())){
p.setInternalEnterprise("true");
}else if("".equals(p.getInternalEnterprise())){
p.setInternalEnterprise("false");
}else{
msg.append("").append(count + 3).append("行:是否内部企业,只能输入是或否,请修改。<br/>");
}
}
// 校验 表中是否存在企业名称
if(!CollectionUtils.isEmpty(listCompanyAll)){
List<PayCompanyManagement> listCompanyEquals = listCompanyAll.stream().filter(p1->Objects.equals(p1.getCompanyName(),p.getCompanyName())).collect(Collectors.toList());
@@ -136,4 +136,9 @@ public class PayCompanyManagement implements Serializable {
*/
@TableField(exist = false)
private String flagStatus;
@Excel(name = "是否内部企业", width = 15)
@ApiModelProperty(value = "是否内部企业")
@Size(max = 6, message = "是否内部企业长度不能大于6个字符")
private String internalEnterprise;
}
@@ -223,4 +223,11 @@ public class PayIncomeContract implements Serializable {
@TableField(exist = false)
@ApiModelProperty(value = "邮寄状态")
private Integer postStatus;
/**
* 邮寄表id,用于展示邮寄状态并用于查询邮寄信息
*/
@TableField(exist = false)
@ApiModelProperty(value = "邮寄id")
private String mailId;
}
@@ -212,4 +212,17 @@ public class PaySpendingContract implements Serializable {
@TableField(exist = false)
@ApiModelProperty(value = "来款状态 0:全部 1:到期未付款")
private Integer chargeStatus;
/**
* 邮寄状态
*/
@TableField(exist = false)
@ApiModelProperty(value = "邮寄状态")
private Integer postStatus;
/**
* 邮寄表id,用于展示邮寄状态并用于查询邮寄信息
*/
@TableField(exist = false)
@ApiModelProperty(value = "邮寄id")
private String mailId;
}
@@ -33,6 +33,8 @@
pic.pack,
pic.pack_year AS packYear,
pic.status,
pmc.id as mailId,
pmc.post_status as postStatus,
if(pic.status = 2,1,0) as statusOrder,
pic.create_by AS createBy,
pic.create_time AS createTime,
@@ -45,6 +47,7 @@
) AS chargeStatus,
if(pic.status = 6,GROUP_CONCAT(picac.charge_project ORDER BY picac.id DESC),GROUP_CONCAT(project.projectName ORDER BY project.id DESC)) AS associatedProject
FROM pay_income_contract pic
LEFT JOIN pay_mail_contract pmc ON pmc.contract_id = pic.id
LEFT JOIN pay_income_contract_associated pica ON pica.contract_id = pic.id
LEFT JOIN pay_income_contract_associated_cancellation picac ON picac.contract_id = pic.id
LEFT JOIN
@@ -137,10 +140,11 @@
pwgs.receivable_amount AS receivableAmount,
pwgs.paid_amount AS paidAmount,
su.realname AS principalName,
pwgs.contacts_temporary_name_one AS contactsName,
pwgsc.contacts_temporary_name AS contactsName,
pica.create_time AS createTime
FROM pay_income_contract_associated pica
JOIN pay_working_group_subitem pwgs ON pica.project_id = pwgs.id
LEFT JOIN pay_working_group_subitem_contacts pwgsc ON pwgsc.working_group_sub_id = pwgs.id and order_num = 1
LEFT JOIN pay_working_group pwg ON pwgs.working_group_id = pwg.id
left join sys_user su on pwg.principal_id_a = su.id
WHERE pica.contract_id = #{contractId}
@@ -32,6 +32,8 @@
psc.pack_year,
psc.status,
if(psc.status = 2,1,0) as statusOrder,
pmc.id as mailId,
pmc.post_status as postStatus,
psc.create_by,
psc.create_time,
psc.update_by,
@@ -42,6 +44,7 @@
) AS chargeStatus
FROM pay_spending_contract psc
left join sys_user su on psc.principal_id = su.id
LEFT JOIN pay_mail_contract pmc ON pmc.contract_id = psc.id
<where>
<if test="paySpendingContract.contractNum != null and paySpendingContract.contractNum != ''">
AND contract_num LIKE CONCAT('%',CONCAT(#{paySpendingContract.contractNum},'%'))
@@ -304,5 +304,21 @@ public class PayMailContractController extends JeroController<PayMailContract, I
}
/**
* 通过id查询
*
* @param id
* @return
*/
@AutoLog(value = "邮寄合同 通过id查询")
@ApiOperation(value="邮寄合同-通过id查询", notes="邮寄合同-通过id查询")
@GetMapping(value = "/queryById")
public Result<?> queryById(@RequestParam(name="id",required=true) String id) {
PayMailContract payMailContract = payMailContractService.getById(id);
if(payMailContract==null) {
return Result.error("未找到对应数据");
}
return Result.OK(payMailContract);
}
}
@@ -33,7 +33,7 @@ public class PayMailContracrList {
@Excel(name = "合同总金额", width = 15)
@ApiModelProperty(value = "合同总金额")
private java.lang.String contractAmount;
@Dict(dicCode ="mail_type" )
@Dict(dicCode ="mail_send" )
@ApiModelProperty(value = "邮寄方式")
private java.lang.String sendMethod;
@ApiModelProperty(value = "邮寄单号")
@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.jero.common.aspect.annotation.Dict;
import lombok.Data;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;
@@ -53,10 +54,12 @@ public class PayMailContract implements Serializable {
@ApiModelProperty(value = "合同id")
private java.lang.String contractId;
/**邮寄状态(0:未邮寄,1::已邮寄)*/
@Dict(dicCode = "mail_type")
@Excel(name = "邮寄状态(0:未邮寄,1::已邮寄)", width = 15)
@ApiModelProperty(value = "邮寄状态(0:未邮寄,1::已邮寄)")
private java.lang.Integer postStatus;
/**快递公司(1:EMS,2:顺丰)*/
@Dict(dicCode ="mail_send" )
@Excel(name = "快递公司(1:EMS,2:顺丰)", width = 15)
@ApiModelProperty(value = "快递公司(1:EMS,2:顺丰)")
private java.lang.Integer sendMethod;
@@ -92,6 +95,7 @@ public class PayMailContract implements Serializable {
@ApiModelProperty(value = "邮寄人(详情使用)")
@TableField(exist = false)
private String mailName;
@Dict(dicCode ="contract_type")
@ApiModelProperty(value = "合同类型:1 支出合同,2 收入合同")
private Integer contractType;
}
@@ -48,10 +48,12 @@ import com.jero.modules.system.service.ISysUserService;
import com.jero.project.entity.PayCommonProject;
import com.jero.project.entity.PayWorkingGroup;
import com.jero.project.entity.PayWorkingGroupSubItem;
import com.jero.project.entity.PayWorkingGroupSubItemContacts;
import com.jero.project.mapper.PayCommonProjectMapper;
import com.jero.project.mapper.PayWorkingGroupMapper;
import com.jero.project.mapper.PayWorkingGroupSubItemMapper;
import com.jero.project.service.IPayWorkingGroupService;
import com.jero.project.service.IPayWorkingGroupSubItemContactsService;
import com.jero.temporary.entity.PayCompanyManagementTemporary;
import com.jero.temporary.entity.PayContactsManagementTemporary;
import com.jero.temporary.service.IPayCompanyManagementTemporaryService;
@@ -66,7 +68,10 @@ import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;
import java.math.BigDecimal;
import java.text.SimpleDateFormat;
import java.util.*;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Objects;
import java.util.stream.Collectors;
/**
@@ -129,6 +134,8 @@ public class PayMailBillServiceImpl extends ServiceImpl<PayMailBillMapper, PayMa
private IPayMemberProjectService memberProjectService;
@Resource
private ITbCertificatePaymentService certificatePaymentService;
@Resource
private IPayWorkingGroupSubItemContactsService payWorkingGroupSubItemContactsService;
@Override
@@ -289,20 +296,15 @@ public class PayMailBillServiceImpl extends ServiceImpl<PayMailBillMapper, PayMa
if(Objects.isNull(payWorkingGroup)){
throw new JeroBootException("工作组不存在!");
}
PayContactsManagementTemporary payWorkingTemporaryOne = payContactsManagementTemporaryService.getById(payWorking.getContactsTemporaryIdOne());
if(!Objects.isNull(payWorkingTemporaryOne)){
listId.add(payWorkingTemporaryOne);
}
if(!StringUtils.isBlank(payWorking.getContactsTemporaryIdTwo())){
PayContactsManagementTemporary payWorkingTemporaryTwo = payContactsManagementTemporaryService.getById(payWorking.getContactsTemporaryIdTwo());
if(!Objects.isNull(payWorkingTemporaryTwo)){
listId.add(payWorkingTemporaryTwo);
}
}
if(!StringUtils.isBlank(payWorking.getContactsTemporaryIdThree())){
PayContactsManagementTemporary payWorkingTemporaryThree = payContactsManagementTemporaryService.getById(payWorking.getContactsTemporaryIdThree());
if(!Objects.isNull(payWorkingTemporaryThree)){
listId.add(payWorkingTemporaryThree);
LambdaQueryWrapper<PayWorkingGroupSubItemContacts> queryPayWorkingGroupSubItemContacts = new LambdaQueryWrapper<>();
queryPayWorkingGroupSubItemContacts.eq(PayWorkingGroupSubItemContacts::getWorkingGroupSubId,payWorking.getId());
List<PayWorkingGroupSubItemContacts> listPayWorkingGroupSubItemContacts = payWorkingGroupSubItemContactsService.list(queryPayWorkingGroupSubItemContacts);
if(!CollectionUtils.isEmpty(listPayWorkingGroupSubItemContacts)){
List<String> listIds = listPayWorkingGroupSubItemContacts.stream().map(PayWorkingGroupSubItemContacts::getContactsTemporaryId).collect(Collectors.toList());
List<PayContactsManagementTemporary> payWorkingTemporary = payContactsManagementTemporaryService.listByIds(listIds);
if(!CollectionUtils.isEmpty(payWorkingTemporary)){
listId.addAll(payWorkingTemporary);
}
}
project = payWorkingGroup.getWorkingGroupProject();
@@ -47,11 +47,12 @@
</where>
<!--工作组项目-->
UNION ALL
select gsub.id,g.working_group_project,gsub.invoice_amount, gsub.charge_use, g.principal_id_a,su.realname,gsub.contacts_temporary_id_one,gsub.contacts_temporary_name_one,gsub.charge_company_temporary_name,gsub.receivable_amount,
select gsub.id,g.working_group_project,gsub.invoice_amount, gsub.charge_use, g.principal_id_a,su.realname,gsubc.contacts_temporary_id as contacts_temporary_id_one,gsubc.contacts_temporary_name as contacts_temporary_name_one,gsub.charge_company_temporary_name,gsub.receivable_amount,
if(gsub.paid_amount is null or gsub.paid_amount = '','0.00',gsub.paid_amount) as paid_amount,gsub.need_invoice,gsub.pack,gsub.in_account,gsub.make_invoice,gsub.mail,gsub.create_time,2,'',''
from pay_working_group g
left join sys_user su on g.principal_id_a = su.id
inner join pay_working_group_subitem gsub on g.id = gsub.working_group_id
inner join pay_working_group_subitem_contacts gsubc on gsubc.working_group_sub_id = gsub.id and order_num=1
<where>
<if test="companyId != null and companyId != ''">
AND gsub.charge_company_id = #{companyId}
@@ -175,10 +176,11 @@
</where>
<!--工作组项目-->
UNION ALL
select gsub.id,g.working_group_project, gsub.charge_use, g.principal_id_a,su.realname,gsub.charge_company_temporary_name,gsub.receivable_amount,gsub.paid_amount,gsub.need_invoice,gsub.pack,gsub.in_account,gsub.make_invoice,gsub.mail,gsub.create_time,2,gsub.contacts_temporary_name_one
select gsub.id,g.working_group_project, gsub.charge_use, g.principal_id_a,su.realname,gsub.charge_company_temporary_name,gsub.receivable_amount,gsub.paid_amount,gsub.need_invoice,gsub.pack,gsub.in_account,gsub.make_invoice,gsub.mail,gsub.create_time,2,gsubc.contacts_temporary_name as contacts_temporary_name_one
from pay_working_group g
left join sys_user su on g.principal_id_a = su.id
inner join pay_working_group_subitem gsub on g.id = gsub.working_group_id
inner join pay_working_group_subitem_contacts gsubc on gsubc.working_group_sub_id = gsub.id and order_num=1
<where>
<if test="projectId != null and projectId != ''">
AND gsub.id = #{projectId}
@@ -421,4 +423,4 @@
LEFT JOIN pay_pack_company_project ppcp ON project.id = ppcp.project_id
LEFT JOIN pay_contacts_management_temporary pcmt ON pcmt.id = project.contacts_temporary_id
</select>
</mapper>
</mapper>
@@ -1,33 +1,15 @@
package com.jero.payment.controller;
import java.math.BigDecimal;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Arrays;
import java.util.Date;
import java.util.List;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.jero.common.api.vo.Result;
import com.jero.common.aspect.annotation.AutoLog;
import com.jero.common.common.ProjectCommon;
import com.jero.common.enums.PaymentStatusEnum;
import com.jero.common.system.base.controller.JeroController;
import com.jero.common.system.query.QueryGenerator;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.jero.common.util.AuthenticationUtils;
import com.jero.contract.common.PayIncomeContractCommon;
import com.jero.mail.PayMailBillVO;
import com.jero.mail.entity.PayMailBill;
import com.jero.mail.entity.PayMailBillProject;
import com.jero.mail.service.IPayMailBillService;
import com.jero.meeting.entity.PayMeetingSituation;
import com.jero.member.entity.PayMemberProjectSubitem;
import com.jero.member.entity.TbCertificatePayment;
import com.jero.member.entity.TbMemberProjectSubitem;
import com.jero.member.service.ITbCertificatePaymentService;
@@ -35,17 +17,19 @@ import com.jero.member.service.ITbMemberProjectSubitemService;
import com.jero.payment.entity.PayPaymentRecord;
import com.jero.payment.service.IPayPaymentRecordService;
import com.jero.project.entity.PayCommonProject;
import com.jero.project.entity.PayWorkingGroupSubItem;
import com.jero.project.vo.PayCommonProjectOutput;
import com.jero.standards.memberinfo.entity.MemberInfo;
import io.lettuce.core.dynamic.annotation.Param;
import lombok.extern.slf4j.Slf4j;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.servlet.ModelAndView;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.servlet.ModelAndView;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
/**
* @Description: pay_payment_record
@@ -58,13 +42,13 @@ import io.swagger.annotations.ApiOperation;
@RequestMapping("/paymentRecord/payPaymentRecord")
@Slf4j
public class PayPaymentRecordController extends JeroController<PayPaymentRecord, IPayPaymentRecordService> {
@Autowired
private IPayPaymentRecordService payPaymentRecordService;
@Autowired
private IPayMailBillService payMailBillService;
@Autowired
@Resource
private IPayPaymentRecordService payPaymentRecordService;
@Resource
private IPayMailBillService payMailBillService;
@Resource
private ITbMemberProjectSubitemService tbMemberProjectSubitemService;
@Autowired
@Resource
private ITbCertificatePaymentService tbCertificatePaymentService;
/**
@@ -85,7 +69,7 @@ public class PayPaymentRecordController extends JeroController<PayPaymentRecord,
page.setRecords(pageList);
return Result.OK(page);
}
/**
* 添加来款
* @return
@@ -40,10 +40,11 @@
<!--工作组项目-->
UNION ALL
select gsub.id,g.working_group_project, gsub.charge_use, g.principal_id_a,su.realname,gsub.charge_company_id,gsub.charge_company_temporary_name,gsub.receivable_amount,gsub.paid_amount,gsub.need_invoice,gsub.pack,gsub.in_account,gsub.make_invoice,gsub.mail,gsub.create_time,2,
gsub.invoice_amount,gsub.mail_contacts_id,'' as register_check_result,gsub.contacts_temporary_name_one,gsub.payment_status,gsub.charge_company_temporary_id
gsub.invoice_amount,gsub.mail_contacts_id,'' as register_check_result,gsubc.contacts_temporary_name as contacts_temporary_name_one,gsub.payment_status,gsub.charge_company_temporary_id
from pay_working_group g
left join sys_user su on g.principal_id_a = su.id
inner join pay_working_group_subitem gsub on g.id = gsub.working_group_id
inner join pay_working_group_subitem_contacts gsubc on gsubc.working_group_sub_id = gsub.id and order_num=1
where
gsub.receivable_amount <![CDATA[<>]]> 0
and gsub.receivable_amount is not null
@@ -425,4 +426,4 @@
<select id="getMonthProjectCount" resultType="java.lang.Integer">
select count(*) from (select * from pay_payment_record WHERE DATE_FORMAT(payment_date,'%Y-%m') = #{time} group by project_id) aa
</select>
</mapper>
</mapper>
@@ -17,6 +17,7 @@ import com.jero.common.exception.JeroBootException;
import com.jero.common.service.SendMessageService;
import com.jero.common.system.api.ISysBaseAPI;
import com.jero.common.system.vo.LoginUser;
import com.jero.common.util.AuthenticationUtils;
import com.jero.common.util.PasswordUtil;
import com.jero.common.util.oConvertUtils;
import com.jero.company.entity.PayCompanyManagement;
@@ -48,15 +49,14 @@ import com.jero.project.common.PayProjectCommon;
import com.jero.project.entity.PayCommonProject;
import com.jero.project.entity.PayWorkingGroup;
import com.jero.project.entity.PayWorkingGroupSubItem;
import com.jero.project.entity.PayWorkingGroupSubItemContacts;
import com.jero.project.mapper.PayCommonProjectMapper;
import com.jero.project.mapper.PayWorkingGroupSubItemMapper;
import com.jero.common.util.AuthenticationUtils;
import com.jero.project.service.IPayWorkingGroupService;
import com.jero.project.service.IPayWorkingGroupSubItemContactsService;
import com.jero.project.vo.PayCommonProjectOutput;
import com.jero.standards.memberinfo.entity.MemberInfo;
import com.jero.temporary.entity.PayCompanyManagementTemporary;
import com.jero.temporary.entity.PayContactsManagementTemporary;
import com.jero.temporary.service.IPayCompanyManagementTemporaryService;
import com.jero.temporary.service.IPayContactsManagementTemporaryService;
import org.apache.commons.beanutils.PropertyUtils;
import org.apache.commons.lang3.StringUtils;
@@ -66,12 +66,12 @@ import org.jeecgframework.poi.excel.entity.ExportParams;
import org.jeecgframework.poi.excel.entity.enmus.ExcelType;
import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.CollectionUtils;
import org.springframework.web.servlet.ModelAndView;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import java.math.BigDecimal;
@@ -122,10 +122,12 @@ public class PayPaymentRecordServiceImpl extends ServiceImpl<PayPaymentRecordMap
private ITbMemberProjectService tbMemberProjectService;
@Resource
private TbCertificatePaymentMapper certificatePaymentMapper;
@Autowired
@Resource
private IPayPaymentCheckService payPaymentCheckService;
@Resource
private IPayCompanyManagementService payCompanyManagementService;
@Resource
private IPayWorkingGroupSubItemContactsService payWorkingGroupSubItemContactsService;
@Value("${jero.path.upload}")
private String upLoadPath;
@@ -335,7 +337,7 @@ public class PayPaymentRecordServiceImpl extends ServiceImpl<PayPaymentRecordMap
* @param checkOrRecord check:企业端走审核流程来款,record:管理端直接来款
*/
@Override
@Transactional
@Transactional(rollbackFor = JeroBootException.class)
public void addOneAmountReceived(PayPaymentRecord payPaymentRecord,List<TbCheckVo> typr5List,List<TbCheckVo> typr6List,Integer flag,String checkOrRecord){
BigDecimal newPaidAmount;
@@ -375,24 +377,16 @@ public class PayPaymentRecordServiceImpl extends ServiceImpl<PayPaymentRecordMap
break;
// 工作组项目
case PayIncomeContractCommon.PROJECT_TYPE2:
PayWorkingGroupSubItem payWorking = payWorkingGroupSubItemMapper.selectById(payPaymentRecord.getProjectId());
PayWorkingGroup payWorkingGroup = payWorkingGroupService.getById(payWorking.getWorkingGroupId());
PayContactsManagementTemporary payWorkingTemporaryOne = payContactsManagementTemporaryService.getById(payWorking.getContactsTemporaryIdOne());
if(!Objects.isNull(payWorkingTemporaryOne)){
listId.add(payWorkingTemporaryOne);
}
if(!StringUtils.isBlank(payWorking.getContactsTemporaryIdTwo())){
PayContactsManagementTemporary payWorkingTemporaryTwo = payContactsManagementTemporaryService.getById(payWorking.getContactsTemporaryIdTwo());
if(!Objects.isNull(payWorkingTemporaryTwo)){
listId.add(payWorkingTemporaryTwo);
}
}
if(!StringUtils.isBlank(payWorking.getContactsTemporaryIdThree())){
PayContactsManagementTemporary payWorkingTemporaryThree = payContactsManagementTemporaryService.getById(payWorking.getContactsTemporaryIdThree());
if(!Objects.isNull(payWorkingTemporaryThree)){
listId.add(payWorkingTemporaryThree);
LambdaQueryWrapper<PayWorkingGroupSubItemContacts> queryPayWorkingGroupSubItemContacts = new LambdaQueryWrapper<>();
queryPayWorkingGroupSubItemContacts.eq(PayWorkingGroupSubItemContacts::getWorkingGroupSubId,payWorking.getId());
List<PayWorkingGroupSubItemContacts> listPayWorkingGroupSubItemContacts = payWorkingGroupSubItemContactsService.list(queryPayWorkingGroupSubItemContacts);
if(!CollectionUtils.isEmpty(listPayWorkingGroupSubItemContacts)){
List<String> listIds = listPayWorkingGroupSubItemContacts.stream().map(PayWorkingGroupSubItemContacts::getContactsTemporaryId).collect(Collectors.toList());
List<PayContactsManagementTemporary> payWorkingTemporary = payContactsManagementTemporaryService.listByIds(listIds);
if(!CollectionUtils.isEmpty(payWorkingTemporary)){
listId.addAll(payWorkingTemporary);
}
}
principalId = payWorkingGroup.getPrincipalIdA();
@@ -407,7 +401,7 @@ public class PayPaymentRecordServiceImpl extends ServiceImpl<PayPaymentRecordMap
payWorking.setInAccount(inAccount);
payWorking.setPaymentStatus(paymentStatus);
payWorkingGroupSubItemMapper.updateById(payWorking);
break;
//会议项目
case PayIncomeContractCommon.PROJECT_TYPE3:
@@ -433,7 +427,7 @@ public class PayPaymentRecordServiceImpl extends ServiceImpl<PayPaymentRecordMap
meeting.setInAccount(inAccount);
meeting.setPaymentStatus(paymentStatus);
payMeetingSituationMapper.updateById(meeting);
break;
//会员项目
case PayIncomeContractCommon.PROJECT_TYPE4:
@@ -458,14 +452,14 @@ public class PayPaymentRecordServiceImpl extends ServiceImpl<PayPaymentRecordMap
member.setInAccount(inAccount);
member.setPaymentStatus(paymentStatus);
payMemberProjectSubitemMapper.updateById(member);
break;
//标协会员
case PayIncomeContractCommon.PROJECT_TYPE5:
TbMemberProjectSubitem tbMember = tbMemberProjectSubitemMapper.selectById(payPaymentRecord.getProjectId());
TbMemberProject tbMemberProject = tbMemberProjectService.getById(tbMember.getProjectId());
principalId = tbMemberProject.getDirectorId();
project = tbMemberProject.getProjectName();
PayContactsManagement tbMemberPayContactsManagement = payContactsManagementService.getById(tbMember.getLiaisonManId());
@@ -491,7 +485,7 @@ public class PayPaymentRecordServiceImpl extends ServiceImpl<PayPaymentRecordMap
tbCheckVo.setCheckResult(PayProjectCommon.YES);
// tbCheckVo.setCheckMark(payPaymentRecord.getRemark());
typr5List.add(tbCheckVo);
break;
//标协证书
case PayIncomeContractCommon.PROJECT_TYPE6:
@@ -1,18 +1,12 @@
package com.jero.project.controller;
import java.math.BigDecimal;
import java.util.*;
import java.util.stream.Collectors;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
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.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.jero.common.api.vo.Result;
import com.jero.common.aspect.annotation.AutoLog;
import com.jero.common.common.RoleCommon;
import com.jero.common.exception.JeroBootException;
import com.jero.common.service.RolePermissionService;
import com.jero.common.system.base.controller.JeroController;
@@ -23,13 +17,14 @@ import com.jero.common.util.oConvertUtils;
import com.jero.contract.entity.PayIncomeContract;
import com.jero.contract.service.IPayIncomeContractService;
import com.jero.project.common.PayProjectCommon;
import com.jero.project.entity.*;
import com.jero.project.entity.PayWorkingGroup;
import com.jero.project.entity.PayWorkingGroupSubItem;
import com.jero.project.service.IPayWorkingGroupService;
import com.jero.project.service.IPayWorkingGroupSubItemService;
import com.jero.project.vo.PayWorkingGroupPayment;
import com.jero.project.vo.PayWorkingGroupVO;
import com.jero.project.service.IPayWorkingGroupService;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.jero.project.service.IPayWorkingGroupSubItemService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
@@ -37,8 +32,15 @@ import org.apache.shiro.SecurityUtils;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.servlet.ModelAndView;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.math.BigDecimal;
import java.util.Arrays;
import java.util.List;
import java.util.Objects;
import java.util.stream.Collectors;
/**
* @Description: 工作组项目
@@ -59,7 +61,7 @@ public class PayWorkingGroupController extends JeroController<PayWorkingGroup, I
private IPayIncomeContractService payIncomeContractService;
@Resource
private RolePermissionService rolePermissionService;
/**
* 分页列表查询
*
@@ -256,7 +258,7 @@ public class PayWorkingGroupController extends JeroController<PayWorkingGroup, I
payWorkingGroupService.copy(payWorkingGroup);
return Result.OK("复制成功!");
}
/**
* 添加
*
@@ -289,7 +291,7 @@ public class PayWorkingGroupController extends JeroController<PayWorkingGroup, I
payWorkingGroupService.save(payWorkingGroup);
return Result.OK("添加成功!");
}
/**
* 编辑
*
@@ -370,7 +372,7 @@ public class PayWorkingGroupController extends JeroController<PayWorkingGroup, I
payWorkingGroupService.deleteById(id);
return Result.OK("删除成功!");
}
/**
* 批量删除
*
@@ -393,7 +395,7 @@ public class PayWorkingGroupController extends JeroController<PayWorkingGroup, I
payWorkingGroupService.deleteByIds(Arrays.asList(ids.split(",")));
return Result.OK("批量删除成功!");
}
/**
* 通过id查询
*
@@ -1,27 +1,12 @@
package com.jero.project.controller;
import java.io.*;
import java.net.URLEncoder;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.UUID;
import java.util.zip.ZipEntry;
import java.util.zip.ZipOutputStream;
import javax.annotation.Resource;
import javax.servlet.ServletOutputStream;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.jero.common.api.vo.Result;
import com.jero.common.aspect.annotation.AutoLog;
import com.jero.common.exception.JeroBootException;
import com.jero.common.system.base.controller.JeroController;
import com.jero.common.system.query.QueryGenerator;
import com.jero.common.system.vo.LoginUser;
import com.jero.common.util.oConvertUtils;
import com.jero.company.entity.PayContactsManagement;
@@ -29,31 +14,36 @@ import com.jero.data.entity.PayCaseCommitteeSubitem;
import com.jero.data.entity.PayCaseCouncilSubitem;
import com.jero.data.service.IPayCaseCommitteeSubitemService;
import com.jero.data.service.IPayCaseCouncilSubitemService;
import com.jero.modules.message.handle.impl.EmailSendMsgHandle;
import com.jero.modules.oss.entity.OSSFile;
import com.jero.modules.oss.service.IOSSFileService;
import com.jero.project.common.PayProjectCommon;
import com.jero.project.entity.DownloadFileRecord;
import com.jero.project.entity.PayWorkingGroupDistributionRecord;
import com.jero.project.entity.PayWorkingGroupSubItem;
import com.jero.project.entity.PayWorkingGroupSubItemContacts;
import com.jero.project.service.IPayWorkingGroupDistributionRecordService;
import com.jero.project.service.IPayWorkingGroupSubItemContactsService;
import com.jero.project.service.IPayWorkingGroupSubItemService;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.shiro.SecurityUtils;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.mybatis.logging.Logger;
import org.mybatis.logging.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;
import org.springframework.web.servlet.ModelAndView;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.*;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.UUID;
import java.util.zip.ZipEntry;
import java.util.zip.ZipOutputStream;
/**
* @Description: 资料
@@ -66,14 +56,16 @@ import io.swagger.annotations.ApiOperation;
@RequestMapping("/project/payWorkingGroupDistributionRecord")
@Slf4j
public class PayWorkingGroupDistributionRecordController extends JeroController<PayWorkingGroupDistributionRecord, IPayWorkingGroupDistributionRecordService> {
@Autowired
private IPayWorkingGroupDistributionRecordService payWorkingGroupDistributionRecordService;
@Autowired
private IPayWorkingGroupSubItemService payWorkingGroupSubItemService;
@Autowired
private IPayCaseCommitteeSubitemService payCaseCommitteeSubitemService;
@Autowired
private IPayCaseCouncilSubitemService payCaseCouncilSubitemService;
@Resource
private IPayWorkingGroupDistributionRecordService payWorkingGroupDistributionRecordService;
@Resource
private IPayWorkingGroupSubItemService payWorkingGroupSubItemService;
@Resource
private IPayCaseCommitteeSubitemService payCaseCommitteeSubitemService;
@Resource
private IPayCaseCouncilSubitemService payCaseCouncilSubitemService;
@Resource
private IPayWorkingGroupSubItemContactsService payWorkingGroupSubItemContactsService;
@Resource
private IOSSFileService iossFileService;
@@ -215,29 +207,15 @@ public class PayWorkingGroupDistributionRecordController extends JeroController<
}
List<PayContactsManagement> listData = new ArrayList<>();
if(projectType == PayProjectCommon.PROJECT_TYPE_FILE1){
LambdaQueryWrapper<PayWorkingGroupSubItem> queryPayWorkingGroupSubItem = new LambdaQueryWrapper<>();
queryPayWorkingGroupSubItem.eq(PayWorkingGroupSubItem::getWorkingGroupId,projectId);
List<PayWorkingGroupSubItem> list = payWorkingGroupSubItemService.list(queryPayWorkingGroupSubItem);
LambdaQueryWrapper<PayWorkingGroupSubItemContacts> queryPayWorkingGroupSubItemContacts = new LambdaQueryWrapper<>();
queryPayWorkingGroupSubItemContacts.eq(PayWorkingGroupSubItemContacts::getWorkingGroupId,projectId);
List<PayWorkingGroupSubItemContacts> list = payWorkingGroupSubItemContactsService.list(queryPayWorkingGroupSubItemContacts);
if(!CollectionUtils.isEmpty(list)){
list.forEach(p->{
if(!StringUtils.isEmpty(p.getContactsIdOne()) && !StringUtils.isEmpty(p.getContactsTemporaryNameOne())){
PayContactsManagement payContactsManagement = new PayContactsManagement();
payContactsManagement.setId(p.getContactsTemporaryIdOne());
payContactsManagement.setName(p.getContactsTemporaryNameOne());
listData.add(payContactsManagement);
}
if(!StringUtils.isEmpty(p.getContactsIdTwo()) && !StringUtils.isEmpty(p.getContactsTemporaryNameTwo())){
PayContactsManagement payContactsManagement1 = new PayContactsManagement();
payContactsManagement1.setId(p.getContactsTemporaryIdTwo());
payContactsManagement1.setName(p.getContactsTemporaryNameTwo());
listData.add(payContactsManagement1);
}
if(!StringUtils.isEmpty(p.getContactsIdThree()) && !StringUtils.isEmpty(p.getContactsTemporaryNameThree())){
PayContactsManagement payContactsManagement2 = new PayContactsManagement();
payContactsManagement2.setId(p.getContactsTemporaryIdThree());
payContactsManagement2.setName(p.getContactsTemporaryNameThree());
listData.add(payContactsManagement2);
}
PayContactsManagement payContactsManagement = new PayContactsManagement();
payContactsManagement.setId(p.getContactsTemporaryId());
payContactsManagement.setName(p.getContactsTemporaryName());
listData.add(payContactsManagement);
});
}
}else if(projectType == PayProjectCommon.PROJECT_TYPE_FILE2){
@@ -0,0 +1,85 @@
package com.jero.project.controller;
import com.jero.common.api.vo.Result;
import com.jero.common.aspect.annotation.AutoLog;
import com.jero.common.system.base.controller.JeroController;
import com.jero.project.entity.PayWorkingGroupSubItemContacts;
import com.jero.project.service.IPayWorkingGroupSubItemContactsService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.util.Arrays;
/**
* @Description: 成员联系人
* @Author: jeecg-boot
* @Date: 2022-04-19
* @Version: V1.0
*/
@Api(tags="成员联系人")
@RestController
@RequestMapping("/project/PayWorkingGroupSubItemContacts")
@Slf4j
public class PayWorkingGroupSubItemContactsController extends JeroController<PayWorkingGroupSubItemContacts, IPayWorkingGroupSubItemContactsService> {
@Resource
private IPayWorkingGroupSubItemContactsService payWorkingGroupSubItemContactsService;
/**
* 添加
*
* @param payWorkingGroupSubItemContacts
* @return
*/
@AutoLog(value = "成员联系人-添加")
@ApiOperation(value="成员联系人-添加", notes="成员联系人-添加")
@PostMapping(value = "/add")
public Result<?> add(@RequestBody PayWorkingGroupSubItemContacts payWorkingGroupSubItemContacts) {
payWorkingGroupSubItemContactsService.save(payWorkingGroupSubItemContacts);
return Result.OK("添加成功!");
}
/**
* 编辑
*
* @param payWorkingGroupSubItemContacts
* @return
*/
@AutoLog(value = "成员联系人-编辑")
@ApiOperation(value="成员联系人-编辑", notes="成员联系人-编辑")
@PutMapping(value = "/edit")
public Result<?> edit(@RequestBody PayWorkingGroupSubItemContacts payWorkingGroupSubItemContacts) {
payWorkingGroupSubItemContactsService.updateById(payWorkingGroupSubItemContacts);
return Result.OK("编辑成功!");
}
/**
* 通过id删除
*
* @param id
* @return
*/
@AutoLog(value = "成员联系人-通过id删除")
@ApiOperation(value="成员联系人-通过id删除", notes="成员联系人-通过id删除")
@DeleteMapping(value = "/delete")
public Result<?> delete(@RequestParam(name="id") String id) {
payWorkingGroupSubItemContactsService.removeById(id);
return Result.OK("删除成功!");
}
/**
* 批量删除
*
* @param ids
* @return
*/
@AutoLog(value = "成员联系人-批量删除")
@ApiOperation(value="成员联系人-批量删除", notes="成员联系人-批量删除")
@DeleteMapping(value = "/deleteBatch")
public Result<?> deleteBatch(@RequestParam(name="ids") String ids) {
payWorkingGroupSubItemContactsService.removeByIds(Arrays.asList(ids.split(",")));
return Result.OK("批量删除成功!");
}
}
@@ -37,7 +37,9 @@ import com.jero.pack.service.IPayPackCompanyService;
import com.jero.project.common.PayProjectCommon;
import com.jero.project.entity.PayWorkingGroup;
import com.jero.project.entity.PayWorkingGroupSubItem;
import com.jero.project.entity.PayWorkingGroupSubItemContacts;
import com.jero.project.service.IPayWorkingGroupService;
import com.jero.project.service.IPayWorkingGroupSubItemContactsService;
import com.jero.project.service.IPayWorkingGroupSubItemService;
import com.jero.project.vo.SetChargeInput;
import com.jero.project.vo.excel.PayWorkingGroupSubItemExcel;
@@ -48,6 +50,7 @@ import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.poi.ss.formula.functions.T;
import org.apache.shiro.SecurityUtils;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.BeanUtils;
@@ -96,6 +99,8 @@ public class PayWorkingGroupSubItemController extends JeroController<PayWorkingG
private RolePermissionService rolePermissionService;
@Resource
private ISysUserService sysUserService;
@Resource
private IPayWorkingGroupSubItemContactsService payWorkingGroupSubItemContactsService;
/**
* 分页列表查询
@@ -167,18 +172,17 @@ public class PayWorkingGroupSubItemController extends JeroController<PayWorkingG
return Result.error("没有查到用户信息!");
}
List<String> listProjectIds = new ArrayList<>();
// 工作组的企业联系人123
LambdaQueryWrapper<PayWorkingGroupSubItem> queryPayWorkingGroupSubItem = new LambdaQueryWrapper<>();
queryPayWorkingGroupSubItem.eq(PayWorkingGroupSubItem::getContactsIdOne,sysUser.getId()).or()
.eq(PayWorkingGroupSubItem::getContactsIdTwo,sysUser.getId()).or()
.eq(PayWorkingGroupSubItem::getContactsIdThree,sysUser.getId()).or()
.eq(PayWorkingGroupSubItem::getMailContactsId,sysUser.getId());
List<PayWorkingGroupSubItem> listPayWorkingGroupSubItem = payWorkingGroupSubItemService.list(queryPayWorkingGroupSubItem);
if(!CollectionUtils.isEmpty(listPayWorkingGroupSubItem)){
List<String> listProjectId = listPayWorkingGroupSubItem.stream().map(PayWorkingGroupSubItem::getId).collect(Collectors.toList());
// 工作组的企业联系人
LambdaQueryWrapper<PayWorkingGroupSubItemContacts> queryPayWorkingGroupSubItemContacts = new LambdaQueryWrapper<>();
queryPayWorkingGroupSubItemContacts.eq(PayWorkingGroupSubItemContacts::getContactsId,sysUser.getId());
List<PayWorkingGroupSubItemContacts> listPayWorkingGroupSubItemContacts = payWorkingGroupSubItemContactsService.list(queryPayWorkingGroupSubItemContacts);
if(!CollectionUtils.isEmpty(listPayWorkingGroupSubItemContacts)){
List<String> listProjectId = listPayWorkingGroupSubItemContacts.stream().map(PayWorkingGroupSubItemContacts::getWorkingGroupSubId).collect(Collectors.toList());
listProjectIds.addAll(listProjectId);
}
// 邮寄联系人
// 邮寄联系人
LambdaQueryWrapper<PayMailBill> queryPayMailBill = new LambdaQueryWrapper<>();
queryPayMailBill.eq(PayMailBill::getContactId,sysUser.getId());
List<PayMailBill> listPayMailBill = payMailBillService.list(queryPayMailBill);
@@ -362,46 +366,57 @@ public class PayWorkingGroupSubItemController extends JeroController<PayWorkingG
&& !Objects.equals(payWorkingGroup.getPrincipalIdB(),sysUser.getId())){
throw new JeroBootException("数据权限不足!");
}
List<String> listContacts = listPayWorkingGroupSubItem.stream().map(PayWorkingGroupSubItem::getContactsTemporaryIdOne).collect(Collectors.toList());
List<String> listIds = listPayWorkingGroupSubItem.stream().map(PayWorkingGroupSubItem::getId).collect(Collectors.toList());
LambdaQueryWrapper<PayWorkingGroupSubItemContacts> queryPayWorkingGroupSubItemContacts = new LambdaQueryWrapper<>();
queryPayWorkingGroupSubItemContacts.in(PayWorkingGroupSubItemContacts::getWorkingGroupSubId,listIds);
// 查询序号为1的联系人
queryPayWorkingGroupSubItemContacts.eq(PayWorkingGroupSubItemContacts::getOrderNum,1);
List<PayWorkingGroupSubItemContacts> listPayWorkingGroupSubItemContacts = payWorkingGroupSubItemContactsService.list(queryPayWorkingGroupSubItemContacts);
if(CollectionUtils.isEmpty(listPayWorkingGroupSubItemContacts)){
return Result.error("联系人不存在!");
}
List<String> listContacts = listPayWorkingGroupSubItemContacts.stream().map(PayWorkingGroupSubItemContacts::getContactsTemporaryId).collect(Collectors.toList());
List<PayContactsManagementTemporary> listPayContactsManagementTemporary = payContactsManagementTemporaryService.listByIds(listContacts);
if(CollectionUtils.isEmpty(listPayContactsManagementTemporary)){
return Result.error("联系人不存在!");
}
List<String> listMsg = new ArrayList<>();
listPayWorkingGroupSubItem.forEach(p->{
List<PayContactsManagementTemporary> listContactsInfo = listPayContactsManagementTemporary.stream().filter(item->Objects.equals(p.getContactsTemporaryIdOne(),item.getId())).collect(Collectors.toList());
if(CollectionUtils.isEmpty(listContactsInfo)){
return;
}
try {
// 发送消息
SendMessageDTO sendMessageDTO = new SendMessageDTO();
if (!StringUtils.isBlank(listContactsInfo.get(0).getEmail())) {
sendMessageDTO.setEmail(PasswordUtil.decrypt(listContactsInfo.get(0).getEmail()));
}
if (!StringUtils.isBlank(listContactsInfo.get(0).getPhone())) {
sendMessageDTO.setToUser(PasswordUtil.decrypt(listContactsInfo.get(0).getPhone()));
sendMessageDTO.setPhone(PasswordUtil.decrypt(listContactsInfo.get(0).getPhone()));
}
HashMap<String, String> map = new HashMap<>();
map.put("projectName", payWorkingGroup.getWorkingGroupProject());
sendMessageDTO.setFromUser(sysUser.getUsername());
sendMessageDTO.setTemplateCode(CompanyMessageEnums.MSG11.getCode());
sendMessageDTO.setTemplateParam(map);
sendMessageDTO.setBusType("C_OPEN_TYPE11");
JSONObject json = new JSONObject();
json.put("id", p.getId());
sendMessageDTO.setBusId(json.toJSONString());
sendMessageService.SendMessageService(sendMessageDTO);
}catch (Exception e){
if(e.getMessage().contains("邮件发送") && !listMsg.contains(p.getChargeCompanyTemporaryName() + "单位邮箱发送失败")){
listMsg.add(p.getChargeCompanyTemporaryName() + "单位邮箱发送失败");
}
}
try{
List<PayWorkingGroupSubItemContacts> listNew = listPayWorkingGroupSubItemContacts.stream().filter(n->Objects.equals(n.getWorkingGroupSubId(),p.getId())).collect(Collectors.toList());
if(CollectionUtils.isEmpty(listNew)){
return;
}
List<PayContactsManagementTemporary> listContactsInfo = listPayContactsManagementTemporary.stream().filter(item->Objects.equals(listNew.get(0).getContactsTemporaryId(),item.getId())).collect(Collectors.toList());
if(CollectionUtils.isEmpty(listContactsInfo)){
return;
}
// 发送消息
SendMessageDTO sendMessageDTO = new SendMessageDTO();
if(!StringUtils.isBlank(listContactsInfo.get(0).getEmail())){
sendMessageDTO.setEmail(PasswordUtil.decrypt(listContactsInfo.get(0).getEmail()));
}
if(!StringUtils.isBlank(listContactsInfo.get(0).getPhone())){
sendMessageDTO.setToUser(PasswordUtil.decrypt(listContactsInfo.get(0).getPhone()));
sendMessageDTO.setPhone(PasswordUtil.decrypt(listContactsInfo.get(0).getPhone()));
}
HashMap<String,String> map = new HashMap<>();
map.put("projectName",payWorkingGroup.getWorkingGroupProject());
sendMessageDTO.setFromUser(sysUser.getUsername());
sendMessageDTO.setTemplateCode(CompanyMessageEnums.MSG11.getCode());
sendMessageDTO.setTemplateParam(map);
sendMessageDTO.setBusType("C_OPEN_TYPE11");
JSONObject json = new JSONObject();
json.put("id",p.getId());
sendMessageDTO.setBusId(json.toJSONString());
sendMessageService.SendMessageService(sendMessageDTO);
}catch (Exception e){
if(e.getMessage().contains("邮件发送") && !listMsg.contains(p.getChargeCompanyTemporaryName() + "单位邮箱发送失败")){
listMsg.add(p.getChargeCompanyTemporaryName() + "单位邮箱发送失败");
}
}
});
return Result.OK("催款提醒成功!",listMsg);
return Result.OK("添加成功!",listMsg);
}
/**
@@ -531,46 +546,103 @@ public class PayWorkingGroupSubItemController extends JeroController<PayWorkingG
exportList = pageList;
}
List<PayWorkingGroupSubItemExcel> excelList = new ArrayList<>();
for (PayWorkingGroupSubItem workingGroupSubItem : exportList) {
PayWorkingGroupSubItemExcel excel = new PayWorkingGroupSubItemExcel();
BeanUtils.copyProperties(workingGroupSubItem,excel);
String contactsTemporaryIdOne = workingGroupSubItem.getContactsTemporaryIdOne();
if (StringUtils.isNotBlank(contactsTemporaryIdOne)){
PayContactsManagementTemporary temporary = payContactsManagementTemporaryService.getById(contactsTemporaryIdOne);
String email = temporary.getEmail();
if (StringUtils.isNotBlank(email)){
excel.setContactsEmailOne(PasswordUtil.decrypt(email));
}
String phone = temporary.getPhone();
if (StringUtils.isNotBlank(phone)){
excel.setContactsPhoneOne(PasswordUtil.decrypt(phone));
if(!CollectionUtils.isEmpty(exportList)){
List<String> listWGSIds = exportList.stream().map(PayWorkingGroupSubItem::getId).collect(Collectors.toList());
LambdaQueryWrapper<PayWorkingGroupSubItemContacts> queryPayWorkingGroupSubItemContacts = new LambdaQueryWrapper<>();
queryPayWorkingGroupSubItemContacts.in(PayWorkingGroupSubItemContacts::getWorkingGroupSubId,listWGSIds);
List<PayWorkingGroupSubItemContacts> payWorkingGroupSubItemContactsList = payWorkingGroupSubItemContactsService.list(queryPayWorkingGroupSubItemContacts);
for (PayWorkingGroupSubItem workingGroupSubItem : exportList) {
PayWorkingGroupSubItemExcel excel = new PayWorkingGroupSubItemExcel();
BeanUtils.copyProperties(workingGroupSubItem,excel);
List<PayWorkingGroupSubItemContacts> listPayWorkingGroupSubItemContacts = payWorkingGroupSubItemContactsList.stream().filter(o->Objects.equals(workingGroupSubItem.getId(),o.getWorkingGroupSubId())).collect(Collectors.toList());
if(!CollectionUtils.isEmpty(listPayWorkingGroupSubItemContacts)){
listPayWorkingGroupSubItemContacts.sort(Comparator.comparing(PayWorkingGroupSubItemContacts::getOrderNum));
List<String> listIds = listPayWorkingGroupSubItemContacts.stream().map(PayWorkingGroupSubItemContacts::getContactsTemporaryId).collect(Collectors.toList());
List<PayContactsManagementTemporary> listPayContactsManagementTemporary = payContactsManagementTemporaryService.listByIds(listIds);
for (int i = 0; i < listPayWorkingGroupSubItemContacts.size(); i++) {
PayWorkingGroupSubItemContacts payWorkingGroupSubItemContacts = listPayWorkingGroupSubItemContacts.get(i);
List<PayContactsManagementTemporary> temporary = listPayContactsManagementTemporary.stream().filter(s->Objects.equals(s.getId(),payWorkingGroupSubItemContacts.getContactsTemporaryId())).collect(Collectors.toList());
String email = "";
String phone = "";
String name = payWorkingGroupSubItemContacts.getContactsTemporaryName();
String remark = payWorkingGroupSubItemContacts.getRemarks();
if(!CollectionUtils.isEmpty(temporary)){
email = temporary.get(0).getEmail();
if (StringUtils.isNotBlank(email)){
email = PasswordUtil.decrypt(email);
}
phone = temporary.get(0).getPhone();
if (StringUtils.isNotBlank(phone)){
phone = PasswordUtil.decrypt(phone);
}
}
switch (i){
case 0:
excel.setContactsNameOne(name);
excel.setRemarksOne(remark);
excel.setContactsEmailOne(email);
excel.setContactsPhoneOne(phone);
break;
case 1:
excel.setContactsNameTwo(name);
excel.setRemarksTwo(remark);
excel.setContactsEmailTwo(email);
excel.setContactsPhoneTwo(phone);
break;
case 2:
excel.setContactsNameThree(name);
excel.setRemarksThree(remark);
excel.setContactsEmailThree(email);
excel.setContactsPhoneThree(phone);
break;
case 3:
excel.setContactsNameFour(name);
excel.setRemarksFour(remark);
excel.setContactsEmailFour(email);
excel.setContactsPhoneFour(phone);
break;
case 4:
excel.setContactsNameFive(name);
excel.setRemarksFive(remark);
excel.setContactsEmailFive(email);
excel.setContactsPhoneFive(phone);
break;
case 5:
excel.setContactsNameSix(name);
excel.setRemarksSix(remark);
excel.setContactsEmailSix(email);
excel.setContactsPhoneSix(phone);
break;
case 6:
excel.setContactsNameSeven(name);
excel.setRemarksSeven(remark);
excel.setContactsEmailSeven(email);
excel.setContactsPhoneSeven(phone);
break;
case 7:
excel.setContactsNameEight(name);
excel.setRemarksEight(remark);
excel.setContactsEmailEight(email);
excel.setContactsPhoneEight(phone);
break;
case 8:
excel.setContactsNameNine(name);
excel.setRemarksNine(remark);
excel.setContactsEmailNine(email);
excel.setContactsPhoneNine(phone);
break;
case 9:
excel.setContactsNameTen(name);
excel.setRemarksTen(remark);
excel.setContactsEmailTen(email);
excel.setContactsPhoneTen(phone);
break;
default:break;
}
}
}
excelList.add(excel);
}
String contactsTemporaryIdTwo = workingGroupSubItem.getContactsTemporaryIdTwo();
if (StringUtils.isNotBlank(contactsTemporaryIdTwo)){
PayContactsManagementTemporary temporary = payContactsManagementTemporaryService.getById(contactsTemporaryIdTwo);
String email = temporary.getEmail();
if (StringUtils.isNotBlank(email)){
excel.setContactsEmailTwo(PasswordUtil.decrypt(email));
}
String phone = temporary.getPhone();
if (StringUtils.isNotBlank(phone)){
excel.setContactsPhoneTwo(PasswordUtil.decrypt(phone));
}
}
String contactsTemporaryIdThree = workingGroupSubItem.getContactsTemporaryIdThree();
if (StringUtils.isNotBlank(contactsTemporaryIdThree)){
PayContactsManagementTemporary temporary = payContactsManagementTemporaryService.getById(contactsTemporaryIdThree);
String email = temporary.getEmail();
if (StringUtils.isNotBlank(email)){
excel.setContactsEmailThree(PasswordUtil.decrypt(email));
}
String phone = temporary.getPhone();
if (StringUtils.isNotBlank(phone)){
excel.setContactsPhoneThree(PasswordUtil.decrypt(phone));
}
}
excelList.add(excel);
}
return super.exportListXls(excelList, PayWorkingGroupSubItemExcel.class, "工作组成员");
}
@@ -14,12 +14,12 @@ import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;
import javax.validation.constraints.DecimalMax;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.List;
/**
* @Description: pay_working_group_subitem
@@ -67,46 +67,46 @@ public class PayWorkingGroupSubItem implements Serializable {
@ApiModelProperty(value = "临时企业联系人1id")
private java.lang.String contactsTemporaryIdOne;
/**临时企业联系人1名称*/
@Excel(name = "企业联系人1", width = 15)
// @Excel(name = "企业联系人1", width = 15)
@ApiModelProperty(value = "临时企业联系人1名称")
private java.lang.String contactsTemporaryNameOne;
/**联系人1备注*/
@Excel(name = "联系人1备注", width = 15)
@ApiModelProperty(value = "联系人1备注")
@Size(max = 50,message = "联系人1备注长度不能大于50个字符")
private java.lang.String remarksOne;
// @Excel(name = "联系人1备注", width = 15)
// @ApiModelProperty(value = "联系人1备注")
// @Size(max = 50,message = "联系人1备注长度不能大于50个字符")
// private java.lang.String remarksOne;
/**企业联系人2id*/
@ApiModelProperty(value = "企业联系人2id")
// @ApiModelProperty(value = "企业联系人2id")
@Size(max = 32,message = "企业联系人2id长度不能大于32个字符")
private java.lang.String contactsIdTwo;
/**临时企业联系人2id*/
@ApiModelProperty(value = "临时企业联系人2id")
private java.lang.String contactsTemporaryIdTwo;
/**临时企业联系人2名称*/
@Excel(name = "企业联系人2", width = 15)
// @Excel(name = "企业联系人2", width = 15)
@ApiModelProperty(value = "临时企业联系人2名称")
private java.lang.String contactsTemporaryNameTwo;
/**联系人2备注*/
@Excel(name = "联系人2备注", width = 15)
@ApiModelProperty(value = "联系人2备注")
@Size(max = 50,message = "联系人2备注长度不能大于50个字符")
private java.lang.String remarksTwo;
// @Excel(name = "联系人2备注", width = 15)
// @ApiModelProperty(value = "联系人2备注")
// @Size(max = 50,message = "联系人2备注长度不能大于50个字符")
// private java.lang.String remarksTwo;
/**企业联系人3id*/
@ApiModelProperty(value = "企业联系人3id")
// @ApiModelProperty(value = "企业联系人3id")
@Size(max = 32,message = "企业联系人3id长度不能大于32个字符")
private java.lang.String contactsIdThree;
/**临时企业联系人3id*/
@ApiModelProperty(value = "临时企业联系人3id")
private java.lang.String contactsTemporaryIdThree;
/**临时企业联系人3名称*/
@Excel(name = "企业联系人3", width = 15)
// @Excel(name = "企业联系人3", width = 15)
@ApiModelProperty(value = "临时企业联系人3名称")
private java.lang.String contactsTemporaryNameThree;
/**联系人3备注*/
@Excel(name = "联系人3备注", width = 15)
@ApiModelProperty(value = "联系人3备注")
@Size(max = 50,message = "联系人3备注长度不能大于50个字符")
private java.lang.String remarksThree;
// @Excel(name = "联系人3备注", width = 15)
// @ApiModelProperty(value = "联系人3备注")
// @Size(max = 50,message = "联系人3备注长度不能大于50个字符")
// private java.lang.String remarksThree;
/**临时邮寄联系人名称*/
@Excel(name = "邮寄联系人", width = 15)
@ApiModelProperty(value = "临时邮寄联系人名称")
@@ -277,4 +277,121 @@ public class PayWorkingGroupSubItem implements Serializable {
@ApiModelProperty(value = "任务及目标")
@TableField(exist = false)
private String missionAndObjectives;
/**
* 企业联系人列表
*/
@ApiModelProperty(value = "企业联系人列表")
@TableField(exist = false)
private List<PayWorkingGroupSubItemContacts> payWorkingGroupSubItemContactsList;
/**企业联系人1名称*/
@Excel(name = "企业联系人1", width = 15)
@ApiModelProperty(value = "企业联系人1")
@TableField(exist = false)
private String contactsNameOne;
/**联系人1备注*/
@Excel(name = "联系人1备注", width = 15)
@ApiModelProperty(value = "联系人1备注")
@Size(max = 50,message = "联系人1备注长度不能大于50个字符")
@TableField(exist = false)
private String remarksOne;
/**企业联系人2名称*/
@Excel(name = "企业联系人2", width = 15)
@ApiModelProperty(value = "企业联系人2")
@TableField(exist = false)
private String contactsNameTwo;
/**联系人2备注*/
@Excel(name = "联系人2备注", width = 15)
@ApiModelProperty(value = "联系人2备注")
@Size(max = 50,message = "联系人2备注长度不能大于50个字符")
@TableField(exist = false)
private String remarksTwo;
/**企业联系人3名称*/
@Excel(name = "企业联系人3", width = 15)
@ApiModelProperty(value = "企业联系人3")
@TableField(exist = false)
private String contactsNameThree;
/**联系人3备注*/
@Excel(name = "联系人3备注", width = 15)
@ApiModelProperty(value = "联系人3备注")
@Size(max = 50,message = "联系人3备注长度不能大于50个字符")
@TableField(exist = false)
private String remarksThree;
/**企业联系人4名称*/
@Excel(name = "企业联系人4", width = 15)
@ApiModelProperty(value = "企业联系人4")
@TableField(exist = false)
private String contactsNameFour;
/**联系人4备注*/
@Excel(name = "联系人4备注", width = 15)
@ApiModelProperty(value = "联系人4备注")
@Size(max = 50,message = "联系人4备注长度不能大于50个字符")
@TableField(exist = false)
private String remarksFour;
/**企业联系人5名称*/
@Excel(name = "企业联系人5", width = 15)
@ApiModelProperty(value = "企业联系人5")
@TableField(exist = false)
private String contactsNameFive;
/**联系人5备注*/
@Excel(name = "联系人5备注", width = 15)
@ApiModelProperty(value = "联系人5备注")
@Size(max = 50,message = "联系人5备注长度不能大于50个字符")
@TableField(exist = false)
private String remarksFive;
/**企业联系人6名称*/
@Excel(name = "企业联系人6", width = 15)
@ApiModelProperty(value = "企业联系人6")
@TableField(exist = false)
private String contactsNameSix;
/**联系人6备注*/
@Excel(name = "联系人6备注", width = 15)
@ApiModelProperty(value = "联系人6备注")
@Size(max = 50,message = "联系人6备注长度不能大于50个字符")
@TableField(exist = false)
private String remarksSix;
/**企业联系人7名称*/
@Excel(name = "企业联系人7", width = 15)
@ApiModelProperty(value = "企业联系人7")
@TableField(exist = false)
private String contactsNameSeven;
/**联系人7备注*/
@Excel(name = "联系人7备注", width = 15)
@ApiModelProperty(value = "联系人7备注")
@Size(max = 50,message = "联系人7备注长度不能大于50个字符")
@TableField(exist = false)
private String remarksSeven;
/**企业联系人8名称*/
@Excel(name = "企业联系人8", width = 15)
@ApiModelProperty(value = "企业联系人8")
@TableField(exist = false)
private String contactsNameEight;
/**联系人8备注*/
@Excel(name = "联系人8备注", width = 15)
@ApiModelProperty(value = "联系人8备注")
@Size(max = 50,message = "联系人8备注长度不能大于50个字符")
@TableField(exist = false)
private String remarksEight;
/**企业联系人9名称*/
@Excel(name = "企业联系人9", width = 15)
@ApiModelProperty(value = "企业联系人9")
@TableField(exist = false)
private String contactsNameNine;
/**联系人9备注*/
@Excel(name = "联系人9备注", width = 15)
@ApiModelProperty(value = "联系人9备注")
@Size(max = 50,message = "联系人9备注长度不能大于50个字符")
@TableField(exist = false)
private String remarksNine;
/**企业联系人10名称*/
@Excel(name = "企业联系人10", width = 15)
@ApiModelProperty(value = "企业联系人10")
@TableField(exist = false)
private String contactsNameTen;
/**联系人10备注*/
@Excel(name = "联系人10备注", width = 15)
@ApiModelProperty(value = "联系人10备注")
@Size(max = 50,message = "联系人10备注长度不能大于50个字符")
@TableField(exist = false)
private String remarksTen;
}
@@ -0,0 +1,124 @@
package com.jero.project.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
import java.util.Date;
/**
* @Description: pay_working_group_subitem_contacts
* @Author: jeecg-boot
* @Date: 2022-04-19
* @Version: V1.0
*/
@Data
@TableName("pay_working_group_subitem_contacts")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="pay_working_group_subitem_contacts对象", description="pay_working_group_subitem_contacts")
public class PayWorkingGroupSubItemContacts implements Serializable {
private static final long serialVersionUID = 1L;
/**id*/
@TableId(type = IdType.ASSIGN_ID)
@ApiModelProperty(value = "id")
private String id;
/**工作组id*/
@Excel(name = "工作组id", width = 15)
@ApiModelProperty(value = "工作组id")
private String workingGroupId;
/**工作组成员id*/
@Excel(name = "工作组成员id", width = 15)
@ApiModelProperty(value = "工作组成员id")
private String workingGroupSubId;
/**企业联系人id*/
@Excel(name = "企业联系人id", width = 15)
@ApiModelProperty(value = "企业联系人id")
private String contactsId;
/**临时企业联系人id*/
@Excel(name = "临时企业联系人id", width = 15)
@ApiModelProperty(value = "临时企业联系人id")
private String contactsTemporaryId;
/**临时企业联系人名称*/
@Excel(name = "临时企业联系人名称", width = 15)
@ApiModelProperty(value = "临时企业联系人名称")
private String contactsTemporaryName;
/**联系人备注*/
@Excel(name = "联系人备注", width = 15)
@ApiModelProperty(value = "联系人备注")
private String remarks;
/**序号*/
@Excel(name = "序号", width = 15)
@ApiModelProperty(value = "序号")
private Integer orderNum;
/**创建人*/
@ApiModelProperty(value = "创建人")
private String createBy;
/**创建时间*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "创建时间")
private Date createTime;
/**更新人*/
@ApiModelProperty(value = "更新人")
private String updateBy;
/**更新时间*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "更新时间")
private Date updateTime;
/**
* 企业联系人性别3
*/
@ApiModelProperty(value = "企业联系人性别")
@TableField(exist = false)
private String gender;
/**
* 企业联系人性别3
*/
@ApiModelProperty(value = "企业联系人性别")
@TableField(exist = false)
private String gender_dictText;
/**
* 企业联系人职务3
*/
@ApiModelProperty(value = "企业联系人职务")
@TableField(exist = false)
private String post;
/**
* 企业联系人电话3
*/
@ApiModelProperty(value = "企业联系人电话")
@TableField(exist = false)
private String phone;
/**
* 企业联系人邮箱3
*/
@ApiModelProperty(value = "企业联系人邮箱")
@TableField(exist = false)
private String email;
/**
* 企业联系人邮编3
*/
@ApiModelProperty(value = "企业联系人邮编")
@TableField(exist = false)
private String postalCodeContacts;
/**
* 企业联系人地址
*/
@ApiModelProperty(value = "企业联系人地址")
@TableField(exist = false)
private String contactAddress;
}
@@ -0,0 +1,15 @@
package com.jero.project.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.jero.project.entity.PayWorkingGroupSubItemContacts;
/**
* @Description: pay_working_group_subitem_contacts
* @Author: jeecg-boot
* @Date: 2022-04-19
* @Version: V1.0
*/
public interface PayWorkingGroupSubItemContactsMapper extends BaseMapper<PayWorkingGroupSubItemContacts> {
}
@@ -0,0 +1,5 @@
<?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.project.mapper.PayWorkingGroupSubItemContactsMapper">
</mapper>
@@ -0,0 +1,14 @@
package com.jero.project.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.jero.project.entity.PayWorkingGroupSubItemContacts;
/**
* @Description: pay_working_group_subitem_contacts
* @Author: jeecg-boot
* @Date: 2022-04-19
* @Version: V1.0
*/
public interface IPayWorkingGroupSubItemContactsService extends IService<PayWorkingGroupSubItemContacts> {
}
@@ -29,20 +29,15 @@ import com.jero.modules.oss.service.IOSSFileService;
import com.jero.project.common.PayProjectCommon;
import com.jero.project.entity.*;
import com.jero.project.mapper.PayWorkingGroupDistributionRecordMapper;
import com.jero.project.service.IPayWorkingGroupDataFileService;
import com.jero.project.service.IPayWorkingGroupDistributionRecordService;
import com.jero.project.service.IPayWorkingGroupService;
import com.jero.project.service.IPayWorkingGroupSubItemService;
import com.jero.project.service.*;
import com.jero.temporary.entity.PayContactsManagementTemporary;
import com.jero.temporary.service.IPayContactsManagementTemporaryService;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.shiro.SecurityUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.core.env.Environment;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;
import java.io.File;
import java.util.*;
@@ -83,10 +78,12 @@ public class PayWorkingGroupDistributionRecordServiceImpl extends ServiceImpl<Pa
private PayWorkingGroupDistributionRecordMapper payWorkingGroupDistributionRecordMapper;
@Resource
private RolePermissionService rolePermissionService;
@Autowired
@Resource
private IPayCaseCouncilSubitemService payCaseCouncilSubitemService;
@Autowired
@Resource
private IPayCaseCouncilService payCaseCouncilService;
@Resource
private IPayWorkingGroupSubItemContactsService payWorkingGroupSubItemContactsService;
@Override
@Transactional
@@ -438,51 +435,23 @@ public class PayWorkingGroupDistributionRecordServiceImpl extends ServiceImpl<Pa
}
private void setRecord(PayWorkingGroupDistributionRecord payWorkingGroupDistributionRecord,String[] s,List<PayWorkingGroupDistributionRecord> listPayWorkingGroupDistributionRecord,OSSFile byId){
// 查询工作组成员一,二,三
LambdaQueryWrapper<PayWorkingGroupSubItem> queryPayWorkingGroupSubItem = new LambdaQueryWrapper<>();
queryPayWorkingGroupSubItem.nested(i ->i.in(PayWorkingGroupSubItem::getContactsTemporaryIdOne,Arrays.asList(s)).or()
.in(PayWorkingGroupSubItem::getContactsTemporaryIdTwo,Arrays.asList(s)).or()
.in(PayWorkingGroupSubItem::getContactsTemporaryIdThree,Arrays.asList(s)));
queryPayWorkingGroupSubItem.eq(PayWorkingGroupSubItem::getWorkingGroupId,payWorkingGroupDistributionRecord.getProjectId());
List<PayWorkingGroupSubItem> listPayWorkingGroupSubItem = payWorkingGroupSubItemService.list(queryPayWorkingGroupSubItem);
if(!CollectionUtils.isEmpty(listPayWorkingGroupSubItem)){
listPayWorkingGroupSubItem.forEach(p->{
if(!StringUtils.isEmpty(p.getContactsTemporaryIdOne()) && Arrays.asList(s).contains(p.getContactsTemporaryIdOne())){
PayWorkingGroupDistributionRecord payWorkingGroupDistributionRecordNew = new PayWorkingGroupDistributionRecord();
payWorkingGroupDistributionRecordNew.setDataId(payWorkingGroupDistributionRecord.getDataId());
payWorkingGroupDistributionRecordNew.setProjectId(payWorkingGroupDistributionRecord.getProjectId());
payWorkingGroupDistributionRecordNew.setProjectType(payWorkingGroupDistributionRecord.getProjectType());
payWorkingGroupDistributionRecordNew.setFileId(byId.getId());
payWorkingGroupDistributionRecordNew.setSubId(p.getId());
payWorkingGroupDistributionRecordNew.setContactsId(p.getContactsIdOne());
payWorkingGroupDistributionRecordNew.setContactsName(p.getContactsTemporaryNameOne());
payWorkingGroupDistributionRecordNew.setTemporaryContactsId(p.getContactsTemporaryIdOne());
listPayWorkingGroupDistributionRecord.add(payWorkingGroupDistributionRecordNew);
}
if(!StringUtils.isEmpty(p.getContactsTemporaryIdTwo()) && Arrays.asList(s).contains(p.getContactsTemporaryIdTwo())){
PayWorkingGroupDistributionRecord payWorkingGroupDistributionRecordNew = new PayWorkingGroupDistributionRecord();
payWorkingGroupDistributionRecordNew.setDataId(payWorkingGroupDistributionRecord.getDataId());
payWorkingGroupDistributionRecordNew.setProjectId(payWorkingGroupDistributionRecord.getProjectId());
payWorkingGroupDistributionRecordNew.setProjectType(payWorkingGroupDistributionRecord.getProjectType());
payWorkingGroupDistributionRecordNew.setFileId(byId.getId());
payWorkingGroupDistributionRecordNew.setSubId(p.getId());
payWorkingGroupDistributionRecordNew.setContactsId(p.getContactsIdTwo());
payWorkingGroupDistributionRecordNew.setContactsName(p.getContactsTemporaryNameTwo());
payWorkingGroupDistributionRecordNew.setTemporaryContactsId(p.getContactsTemporaryIdTwo());
listPayWorkingGroupDistributionRecord.add(payWorkingGroupDistributionRecordNew);
}
if(!StringUtils.isEmpty(p.getContactsTemporaryIdThree()) && Arrays.asList(s).contains(p.getContactsTemporaryIdThree())){
PayWorkingGroupDistributionRecord payWorkingGroupDistributionRecordNew = new PayWorkingGroupDistributionRecord();
payWorkingGroupDistributionRecordNew.setDataId(payWorkingGroupDistributionRecord.getDataId());
payWorkingGroupDistributionRecordNew.setProjectId(payWorkingGroupDistributionRecord.getProjectId());
payWorkingGroupDistributionRecordNew.setProjectType(payWorkingGroupDistributionRecord.getProjectType());
payWorkingGroupDistributionRecordNew.setFileId(byId.getId());
payWorkingGroupDistributionRecordNew.setSubId(p.getId());
payWorkingGroupDistributionRecordNew.setContactsId(p.getContactsIdThree());
payWorkingGroupDistributionRecordNew.setContactsName(p.getContactsTemporaryNameThree());
payWorkingGroupDistributionRecordNew.setTemporaryContactsId(p.getContactsTemporaryIdThree());
listPayWorkingGroupDistributionRecord.add(payWorkingGroupDistributionRecordNew);
}
// 查询工作组成员
LambdaQueryWrapper<PayWorkingGroupSubItemContacts> queryPayWorkingGroupSubItemContacts = new LambdaQueryWrapper<>();
queryPayWorkingGroupSubItemContacts.eq(PayWorkingGroupSubItemContacts::getWorkingGroupId,payWorkingGroupDistributionRecord.getProjectId());
queryPayWorkingGroupSubItemContacts.in(PayWorkingGroupSubItemContacts::getContactsTemporaryId,Arrays.asList(s));
List<PayWorkingGroupSubItemContacts> list = payWorkingGroupSubItemContactsService.list(queryPayWorkingGroupSubItemContacts);
if(!CollectionUtils.isEmpty(list)){
list.forEach(p->{
PayWorkingGroupDistributionRecord payWorkingGroupDistributionRecordNew = new PayWorkingGroupDistributionRecord();
payWorkingGroupDistributionRecordNew.setDataId(payWorkingGroupDistributionRecord.getDataId());
payWorkingGroupDistributionRecordNew.setProjectId(payWorkingGroupDistributionRecord.getProjectId());
payWorkingGroupDistributionRecordNew.setProjectType(payWorkingGroupDistributionRecord.getProjectType());
payWorkingGroupDistributionRecordNew.setFileId(byId.getId());
payWorkingGroupDistributionRecordNew.setSubId(p.getWorkingGroupSubId());
payWorkingGroupDistributionRecordNew.setContactsId(p.getContactsId());
payWorkingGroupDistributionRecordNew.setContactsName(p.getContactsTemporaryName());
payWorkingGroupDistributionRecordNew.setTemporaryContactsId(p.getContactsTemporaryId());
listPayWorkingGroupDistributionRecord.add(payWorkingGroupDistributionRecordNew);
});
}
}
@@ -0,0 +1,19 @@
package com.jero.project.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.jero.project.entity.PayWorkingGroupSubItemContacts;
import com.jero.project.mapper.PayWorkingGroupSubItemContactsMapper;
import com.jero.project.service.IPayWorkingGroupSubItemContactsService;
import org.springframework.stereotype.Service;
/**
* @Description: pay_working_group_subitem_contacts
* @Author: jeecg-boot
* @Date: 2022-04-19
* @Version: V1.0
*/
@Service
public class PayWorkingGroupSubItemContactsServiceImpl extends ServiceImpl<PayWorkingGroupSubItemContactsMapper, PayWorkingGroupSubItemContacts> implements IPayWorkingGroupSubItemContactsService {
}
@@ -38,12 +38,10 @@ import com.jero.pack.entity.PayPackCompanyProject;
import com.jero.pack.service.IPayPackCompanyProjectService;
import com.jero.payment.service.IPayPaymentCheckService;
import com.jero.project.common.PayProjectCommon;
import com.jero.project.entity.PayWorkGroupSubletStatistics;
import com.jero.project.entity.PayWorkingGroup;
import com.jero.project.entity.PayWorkingGroupSubItem;
import com.jero.project.entity.PayWorkingGroupSubletSearch;
import com.jero.project.entity.*;
import com.jero.project.mapper.PayWorkingGroupSubItemMapper;
import com.jero.project.service.IPayWorkingGroupService;
import com.jero.project.service.IPayWorkingGroupSubItemContactsService;
import com.jero.project.service.IPayWorkingGroupSubItemService;
import com.jero.project.vo.SetChargeInput;
import com.jero.statistics.entity.AllMoney;
@@ -118,24 +116,47 @@ public class PayWorkingGroupSubItemServiceImpl extends ServiceImpl<PayWorkingGro
@Resource
private IOSSFileService iossFileService;
@Resource
private IPayWorkingGroupSubItemContactsService payWorkingGroupSubItemContactsService;
@Resource
private Environment env;
@Override
public IPage<PayWorkingGroupSubItem> queryPageList(Page<PayWorkingGroupSubItem> page, PayWorkingGroupSubItem payWorkingGroupSubitem,String paymentDate) {
IPage<PayWorkingGroupSubItem> payWorkingGroupSubItemIPage = payWorkingGroupSubItemMapper.queryPageList(page, payWorkingGroupSubitem, paymentDate);
if (StringUtils.isNotBlank(payWorkingGroupSubitem.getMeetingId())){
List<PayWorkingGroupSubItem> records = payWorkingGroupSubItemIPage.getRecords();
List<PayWorkingGroupSubItem> records = payWorkingGroupSubItemIPage.getRecords();
if(!CollectionUtils.isEmpty(records)){
// 获取企业联系人
List<String> listIds = records.stream().map(PayWorkingGroupSubItem::getId).collect(Collectors.toList());
LambdaQueryWrapper<PayWorkingGroupSubItemContacts> queryPayWorkingGroupSubItemContacts = new LambdaQueryWrapper<>();
queryPayWorkingGroupSubItemContacts.in(PayWorkingGroupSubItemContacts::getWorkingGroupSubId,listIds);
List<PayWorkingGroupSubItemContacts> payWorkingGroupSubItemContactsList = payWorkingGroupSubItemContactsService.list(queryPayWorkingGroupSubItemContacts);
for (PayWorkingGroupSubItem workingGroupSubItem : records) {
String workingGroupSubItemId = workingGroupSubItem.getId();
LambdaQueryWrapper<PayMeetingRemindRecord> wrapper = new LambdaQueryWrapper<>();
wrapper.eq(PayMeetingRemindRecord::getSubitemId,workingGroupSubItemId);
wrapper.eq(PayMeetingRemindRecord::getMeetingId,payWorkingGroupSubitem.getMeetingId());
int count = payMeetingRemindRecordService.count(wrapper);
if (count>0){
workingGroupSubItem.setRemind(PayProjectCommon.YES);
}else {
workingGroupSubItem.setRemind(PayProjectCommon.NO);
if (StringUtils.isNotBlank(payWorkingGroupSubitem.getMeetingId())) {
String workingGroupSubItemId = workingGroupSubItem.getId();
LambdaQueryWrapper<PayMeetingRemindRecord> wrapper = new LambdaQueryWrapper<>();
wrapper.eq(PayMeetingRemindRecord::getSubitemId, workingGroupSubItemId);
wrapper.eq(PayMeetingRemindRecord::getMeetingId, payWorkingGroupSubitem.getMeetingId());
int count = payMeetingRemindRecordService.count(wrapper);
if (count > 0) {
workingGroupSubItem.setRemind(PayProjectCommon.YES);
} else {
workingGroupSubItem.setRemind(PayProjectCommon.NO);
}
}
if(!CollectionUtils.isEmpty(payWorkingGroupSubItemContactsList)){
List<PayWorkingGroupSubItemContacts> pwg = payWorkingGroupSubItemContactsList.stream().filter(p->Objects.equals(p.getWorkingGroupSubId(),workingGroupSubItem.getId())).collect(Collectors.toList());
if(!CollectionUtils.isEmpty(pwg)){
pwg.sort(Comparator.comparing(PayWorkingGroupSubItemContacts::getOrderNum));
workingGroupSubItem.setContactsTemporaryNameOne(pwg.get(0).getContactsTemporaryName());
workingGroupSubItem.setPayWorkingGroupSubItemContactsList(pwg);
}else{
workingGroupSubItem.setContactsTemporaryNameOne("");
workingGroupSubItem.setPayWorkingGroupSubItemContactsList(null);
}
}else{
workingGroupSubItem.setContactsTemporaryNameOne("");
workingGroupSubItem.setPayWorkingGroupSubItemContactsList(null);
}
}
}
@@ -143,8 +164,17 @@ public class PayWorkingGroupSubItemServiceImpl extends ServiceImpl<PayWorkingGro
}
@Override
@Transactional
@Transactional(rollbackFor = JeroBootException.class)
public void addPayWorkingGroupSubItem(PayWorkingGroupSubItem payWorkingGroupSubItem) {
List<PayWorkingGroupSubItemContacts> listPayWorkingGroupSubItemContacts = payWorkingGroupSubItem.getPayWorkingGroupSubItemContactsList();
if(!CollectionUtils.isEmpty(listPayWorkingGroupSubItemContacts)){
long oldNum = listPayWorkingGroupSubItemContacts.size();
long newNum = listPayWorkingGroupSubItemContacts.stream().map(PayWorkingGroupSubItemContacts::getContactsId).collect(Collectors.toList()).stream().distinct().count();
if(oldNum != newNum){
throw new JeroBootException("企业联系人重复");
}
}
if(Objects.equals(payWorkingGroupSubItem.getChargeWay(),PayProjectCommon.CHARGE_WAY2)){
if(Objects.isNull(payWorkingGroupSubItem.getReceivableAmount())){
throw new JeroBootException("应收金额不能为空");
@@ -153,7 +183,7 @@ public class PayWorkingGroupSubItemServiceImpl extends ServiceImpl<PayWorkingGro
throw new JeroBootException("合同号不能为空");
}
}
if(payWorkingGroupSubItem.getChargeWay() == PayProjectCommon.CHARGE_WAY3){
if(Objects.equals(payWorkingGroupSubItem.getChargeWay(),PayProjectCommon.CHARGE_WAY3)){
if(Objects.isNull(payWorkingGroupSubItem.getChargeNoticeNo())){
throw new JeroBootException("收费通知号不能为空");
}
@@ -191,6 +221,16 @@ public class PayWorkingGroupSubItemServiceImpl extends ServiceImpl<PayWorkingGro
payWorkingGroupSubItem.setMail(PayProjectCommon.MAIL0);
payWorkingGroupSubItem.setChargeUse(PayProjectCommon.CHARGE_USE1);
payWorkingGroupSubItemService.save(payWorkingGroupSubItem);
List<PayWorkingGroupSubItemContacts> listPayWorkingGroupSubItemContactsNew = payWorkingGroupSubItem.getPayWorkingGroupSubItemContactsList();
// 添加联系人表
if(!CollectionUtils.isEmpty(listPayWorkingGroupSubItemContactsNew)){
for (int i = 0; i < listPayWorkingGroupSubItemContactsNew.size(); i++) {
listPayWorkingGroupSubItemContactsNew.get(i).setOrderNum(i+1);
listPayWorkingGroupSubItemContactsNew.get(i).setWorkingGroupId(payWorkingGroupSubItem.getWorkingGroupId());
listPayWorkingGroupSubItemContactsNew.get(i).setWorkingGroupSubId(payWorkingGroupSubItem.getId());
}
payWorkingGroupSubItemContactsService.saveBatch(listPayWorkingGroupSubItemContactsNew);
}
List<String> listFile = new ArrayList<>();
// 获取收费通知
if(Objects.equals(payWorkingGroupSubItem.getChargeWay(),PayProjectCommon.CHARGE_WAY3) && StringUtils.isNotBlank(payWorkingGroupSubItem.getChargeNoticeId())){
@@ -301,6 +341,7 @@ public class PayWorkingGroupSubItemServiceImpl extends ServiceImpl<PayWorkingGro
@Override
@Transactional
public void editPayWorkingGroupSubItem(PayWorkingGroupSubItem payWorkingGroupSubItem) {
PayWorkingGroupSubItem payWorkingGroupSubItemOld = payWorkingGroupSubItemService.getById(payWorkingGroupSubItem.getId());
if(Objects.isNull(payWorkingGroupSubItemOld)){
throw new JeroBootException("项目不存在!");
@@ -386,7 +427,23 @@ public class PayWorkingGroupSubItemServiceImpl extends ServiceImpl<PayWorkingGro
payPackCompanyProjectService.setPack(payWorkingGroupSubItem.getChargeCompanyId(),payWorkingGroupSubItem.getContactsIdOne(),payIncomeContractAdd.getPackYear(),payWorkingGroupSubItem.getId(),PayProjectCommon.PROJECT_TYPE2,payIncomeContractAdd.getPack());
}
}
LambdaQueryWrapper<PayWorkingGroupSubItemContacts> queryPayWorkingGroupSubItemContacts = new LambdaQueryWrapper<>();
queryPayWorkingGroupSubItemContacts.eq(PayWorkingGroupSubItemContacts::getWorkingGroupSubId,payWorkingGroupSubItemOld.getId());
List<PayWorkingGroupSubItemContacts> listPayWorkingGroupSubItemContacts = payWorkingGroupSubItemContactsService.list(queryPayWorkingGroupSubItemContacts);
if(!CollectionUtils.isEmpty(listPayWorkingGroupSubItemContacts)){
payWorkingGroupSubItemOld.setPayWorkingGroupSubItemContactsList(listPayWorkingGroupSubItemContacts);
}
setPayWorkingGroupSubItemEdit(payWorkingGroupSubItem,payWorkingGroupSubItemOld);
List<PayWorkingGroupSubItemContacts> listPayWorkingGroupSubItemContactsNew = payWorkingGroupSubItem.getPayWorkingGroupSubItemContactsList();
// 添加联系人表
if(!CollectionUtils.isEmpty(listPayWorkingGroupSubItemContactsNew)){
for (int i = 0; i < listPayWorkingGroupSubItemContactsNew.size(); i++) {
listPayWorkingGroupSubItemContactsNew.get(i).setOrderNum(i+1);
listPayWorkingGroupSubItemContactsNew.get(i).setWorkingGroupId(payWorkingGroupSubItem.getWorkingGroupId());
listPayWorkingGroupSubItemContactsNew.get(i).setWorkingGroupSubId(payWorkingGroupSubItem.getId());
}
payWorkingGroupSubItemContactsService.saveBatch(listPayWorkingGroupSubItemContactsNew);
}
payWorkingGroupSubItem.setChargeUse(PayProjectCommon.CHARGE_USE1);
// 变更应收金额,重新校验状态
ProjectStatusVO projectStatusVO = projectDetailService.getStatus(payWorkingGroupSubItem.getId(),payWorkingGroupSubItem.getReceivableAmount(),payWorkingGroupSubItem.getNeedInvoice());
@@ -428,7 +485,7 @@ public class PayWorkingGroupSubItemServiceImpl extends ServiceImpl<PayWorkingGro
}
@Override
@Transactional
@Transactional(rollbackFor = JeroBootException.class)
public void importExcel(HttpServletRequest request) {
MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request;
String workGroupId;
@@ -477,20 +534,55 @@ public class PayWorkingGroupSubItemServiceImpl extends ServiceImpl<PayWorkingGro
// msg.append("excel中企业不存在 ");
// }
List<String> listContactsName = new ArrayList<>();
// 获取excel中联系人名称
List<String> listContactsNameOne = list.stream().map(PayWorkingGroupSubItem::getContactsTemporaryNameOne).collect(Collectors.toList());
if(!CollectionUtils.isEmpty(listContactsNameOne)){
listContactsName.addAll(listContactsNameOne);
// 获取excel中联系人1名称
List<String> listContactsName1 = list.stream().map(PayWorkingGroupSubItem::getContactsNameOne).collect(Collectors.toList());
if(!CollectionUtils.isEmpty(listContactsName1)){
listContactsName.addAll(listContactsName1);
}
// 获取excel中联系人名称
List<String> listContactsNameTwo = list.stream().map(PayWorkingGroupSubItem::getContactsTemporaryNameTwo).collect(Collectors.toList());
if(!CollectionUtils.isEmpty(listContactsNameTwo)){
listContactsName.addAll(listContactsNameTwo);
// 获取excel中联系人2名称
List<String> listContactsName2 = list.stream().map(PayWorkingGroupSubItem::getContactsNameTwo).collect(Collectors.toList());
if(!CollectionUtils.isEmpty(listContactsName2)){
listContactsName.addAll(listContactsName2);
}
// 获取excel中联系人名称
List<String> listContactsNameThree = list.stream().map(PayWorkingGroupSubItem::getContactsTemporaryNameThree).collect(Collectors.toList());
if(!CollectionUtils.isEmpty(listContactsNameThree)){
listContactsName.addAll(listContactsNameThree);
// 获取excel中联系人3名称
List<String> listContactsName3 = list.stream().map(PayWorkingGroupSubItem::getContactsNameThree).collect(Collectors.toList());
if(!CollectionUtils.isEmpty(listContactsName3)){
listContactsName.addAll(listContactsName3);
}
// 获取excel中联系人4名称
List<String> listContactsName4 = list.stream().map(PayWorkingGroupSubItem::getContactsNameFour).collect(Collectors.toList());
if(!CollectionUtils.isEmpty(listContactsName4)){
listContactsName.addAll(listContactsName4);
}
// 获取excel中联系人5名称
List<String> listContactsName5 = list.stream().map(PayWorkingGroupSubItem::getContactsNameFive).collect(Collectors.toList());
if(!CollectionUtils.isEmpty(listContactsName5)){
listContactsName.addAll(listContactsName5);
}
// 获取excel中联系人6名称
List<String> listContactsName6 = list.stream().map(PayWorkingGroupSubItem::getContactsNameSix).collect(Collectors.toList());
if(!CollectionUtils.isEmpty(listContactsName6)){
listContactsName.addAll(listContactsName6);
}
// 获取excel中联系人7名称
List<String> listContactsName7 = list.stream().map(PayWorkingGroupSubItem::getContactsNameSeven).collect(Collectors.toList());
if(!CollectionUtils.isEmpty(listContactsName7)){
listContactsName.addAll(listContactsName7);
}
// 获取excel中联系人8名称
List<String> listContactsName8 = list.stream().map(PayWorkingGroupSubItem::getContactsNameEight).collect(Collectors.toList());
if(!CollectionUtils.isEmpty(listContactsName8)){
listContactsName.addAll(listContactsName8);
}
// 获取excel中联系人9名称
List<String> listContactsName9 = list.stream().map(PayWorkingGroupSubItem::getContactsNameNine).collect(Collectors.toList());
if(!CollectionUtils.isEmpty(listContactsName9)){
listContactsName.addAll(listContactsName9);
}
// 获取excel中联系人10名称
List<String> listContactsName10 = list.stream().map(PayWorkingGroupSubItem::getContactsNameTen).collect(Collectors.toList());
if(!CollectionUtils.isEmpty(listContactsName10)){
listContactsName.addAll(listContactsName10);
}
// 获取excel中邮寄联系人名称
List<String> listContactsNameMail = list.stream().map(PayWorkingGroupSubItem::getMailContactsTemporaryName).collect(Collectors.toList());
@@ -538,67 +630,9 @@ public class PayWorkingGroupSubItemServiceImpl extends ServiceImpl<PayWorkingGro
msg.append("").append(count + 3).append("行:工作组成员单位已存在,请修改。<br/>");
}
}
if(!StringUtils.isBlank(p.getContactsTemporaryNameOne()) && !StringUtils.isBlank(p.getContactsTemporaryNameTwo())
&& Objects.equals(p.getContactsTemporaryNameOne(),p.getContactsTemporaryNameTwo())){
msg.append("").append(count + 3).append("行:企业联系人1与企业联系人2重复,请修改。<br/>");
}
if(!StringUtils.isBlank(p.getContactsTemporaryNameOne()) && !StringUtils.isBlank(p.getContactsTemporaryNameThree())
&& Objects.equals(p.getContactsTemporaryNameOne(),p.getContactsTemporaryNameThree())){
msg.append("").append(count + 3).append("行:企业联系人1与企业联系人3重复,请修改。<br/>");
}
if(!StringUtils.isBlank(p.getContactsTemporaryNameTwo()) && !StringUtils.isBlank(p.getContactsTemporaryNameThree())
&& Objects.equals(p.getContactsTemporaryNameTwo(),p.getContactsTemporaryNameThree())){
msg.append("").append(count + 3).append("行:企业联系人2与企业联系人3重复,请修改。<br/>");
}
// 校验联系人一
if (StringUtils.isBlank(p.getContactsTemporaryNameOne())) {
msg.append("").append(count + 3).append("行:企业联系人1不能为空,请修改。<br/>");
} else {
if (!CollectionUtils.isEmpty(listCompany)) {
// 通过联系人获取联系人id
List<PayCompanyManagement> finalListCompany = listCompany;
List<PayContactsManagement> listContacts = listContactsInfo.stream().filter(item ->
Objects.equals(item.getName(), p.getContactsTemporaryNameOne())
&& Objects.equals(item.getCompanyId(), finalListCompany.get(0).getId())).collect(Collectors.toList());
if (CollectionUtils.isEmpty(listContacts)) {
msg.append("").append(count + 3).append("行:该企业下不存在企业联系人1,请修改。<br/>");
} else {
p.setContactsIdOne(listContacts.get(0).getId());
}
}
}
// 校验联系人二
if (!StringUtils.isBlank(p.getContactsTemporaryNameTwo()) && !CollectionUtils.isEmpty(listCompany)) {
if (!CollectionUtils.isEmpty(listCompany)) {
// 通过联系人获取联系人id
List<PayCompanyManagement> finalListCompany = listCompany;
List<PayContactsManagement> listContacts = listContactsInfo.stream().filter(item ->
Objects.equals(item.getName(), p.getContactsTemporaryNameTwo())
&& Objects.equals(item.getCompanyId(), finalListCompany.get(0).getId())).collect(Collectors.toList());
if (CollectionUtils.isEmpty(listContacts)) {
msg.append("").append(count + 3).append("行:该企业下不存在企业联系人2,请修改。<br/>");
} else {
p.setContactsIdTwo(listContacts.get(0).getId());
}
}
}
// 校验联系人三
if (!StringUtils.isBlank(p.getContactsTemporaryNameThree()) && !CollectionUtils.isEmpty(listCompany)) {
if (!CollectionUtils.isEmpty(listCompany)) {
// 通过联系人获取联系人id
List<PayCompanyManagement> finalListCompany = listCompany;
List<PayContactsManagement> listContacts = listContactsInfo.stream().filter(item ->
Objects.equals(item.getName(), p.getContactsTemporaryNameThree())
&& Objects.equals(item.getCompanyId(), finalListCompany.get(0).getId())).collect(Collectors.toList());
if (CollectionUtils.isEmpty(listContacts)) {
msg.append("").append(count + 3).append("行:该企业下不存在企业联系人3,请修改。<br/>");
} else {
p.setContactsIdThree(listContacts.get(0).getId());
}
}
}
// 校验重复
List<PayWorkingGroupSubItemContacts> listPayWorkingGroupSubItemContacts = checkRepeat(p,msg,count,listCompany,listContactsInfo);
p.setPayWorkingGroupSubItemContactsList(listPayWorkingGroupSubItemContacts);
// 校验邮寄联系人
if (StringUtils.isBlank(p.getMailContactsTemporaryName())) {
msg.append("").append(count + 3).append("行:邮寄联系人不能为空,请修改。<br/>");
@@ -677,6 +711,15 @@ public class PayWorkingGroupSubItemServiceImpl extends ServiceImpl<PayWorkingGro
// 更新数据
payWorkingGroupSubItemService.saveBatch(list);
list.forEach(p->{
List<PayWorkingGroupSubItemContacts> listPayWorkingGroupSubItemContacts = p.getPayWorkingGroupSubItemContactsList();
if(!CollectionUtils.isEmpty(listPayWorkingGroupSubItemContacts)){
for (int i = 0; i < listPayWorkingGroupSubItemContacts.size(); i++) {
listPayWorkingGroupSubItemContacts.get(i).setWorkingGroupId(p.getWorkingGroupId());
listPayWorkingGroupSubItemContacts.get(i).setWorkingGroupSubId(p.getId());
listPayWorkingGroupSubItemContacts.get(i).setOrderNum(i + 1);
}
payWorkingGroupSubItemContactsService.saveBatch(listPayWorkingGroupSubItemContacts);
}
PayIncomeContract payIncomeContract = p.getPayIncomeContract();
if(Objects.isNull(payIncomeContract)){
return;
@@ -716,6 +759,86 @@ public class PayWorkingGroupSubItemServiceImpl extends ServiceImpl<PayWorkingGro
}
}
}
/**
* @Description // 验证重复
* @Date 2022/4/20 10:26
* @param p
* @param msg
* @param count 行数
* @param listCompany 企业集合
* @param listContactsInfo 联系人集合
* @return java.lang.String
*/
private List<PayWorkingGroupSubItemContacts> checkRepeat(PayWorkingGroupSubItem p,StringBuilder msg,int count,List<PayCompanyManagement> listCompany,List<PayContactsManagement> listContactsInfo){
List<PayWorkingGroupSubItemContacts> list = new ArrayList<>();
HashMap<String,Integer> map = new HashMap<>();
if(!StringUtils.isBlank(p.getContactsNameOne())){
PayWorkingGroupSubItemContacts payWorkingGroupSubItemContacts = setContactsId(msg,p.getContactsNameOne(),1,count,listCompany,listContactsInfo,map);
list.add(payWorkingGroupSubItemContacts);
}else{
msg.append("").append(count + 3).append("行:企业联系人1不能为空,请修改。<br/>");
}
if(!StringUtils.isBlank(p.getContactsNameTwo())){
PayWorkingGroupSubItemContacts payWorkingGroupSubItemContacts = setContactsId(msg,p.getContactsNameTwo(),2,count,listCompany,listContactsInfo,map);
list.add(payWorkingGroupSubItemContacts);
}
if(!StringUtils.isBlank(p.getContactsNameThree())){
PayWorkingGroupSubItemContacts payWorkingGroupSubItemContacts = setContactsId(msg,p.getContactsNameThree(),3,count,listCompany,listContactsInfo,map);
list.add(payWorkingGroupSubItemContacts);
}
if(!StringUtils.isBlank(p.getContactsNameFour())){
PayWorkingGroupSubItemContacts payWorkingGroupSubItemContacts = setContactsId(msg,p.getContactsNameFour(),4,count,listCompany,listContactsInfo,map);
list.add(payWorkingGroupSubItemContacts);
}
if(!StringUtils.isBlank(p.getContactsNameFive())){
PayWorkingGroupSubItemContacts payWorkingGroupSubItemContacts = setContactsId(msg,p.getContactsNameFive(),5,count,listCompany,listContactsInfo,map);
list.add(payWorkingGroupSubItemContacts);
}
if(!StringUtils.isBlank(p.getContactsNameSix())){
PayWorkingGroupSubItemContacts payWorkingGroupSubItemContacts = setContactsId(msg,p.getContactsNameSix(),6,count,listCompany,listContactsInfo,map);
list.add(payWorkingGroupSubItemContacts);
}
if(!StringUtils.isBlank(p.getContactsNameSeven())){
PayWorkingGroupSubItemContacts payWorkingGroupSubItemContacts = setContactsId(msg,p.getContactsNameSeven(),7,count,listCompany,listContactsInfo,map);
list.add(payWorkingGroupSubItemContacts);
}
if(!StringUtils.isBlank(p.getContactsNameEight())){
PayWorkingGroupSubItemContacts payWorkingGroupSubItemContacts = setContactsId(msg,p.getContactsNameEight(),8,count,listCompany,listContactsInfo,map);
list.add(payWorkingGroupSubItemContacts);
}
if(!StringUtils.isBlank(p.getContactsNameNine())){
PayWorkingGroupSubItemContacts payWorkingGroupSubItemContacts = setContactsId(msg,p.getContactsNameNine(),9,count,listCompany,listContactsInfo,map);
list.add(payWorkingGroupSubItemContacts);
}
if(!StringUtils.isBlank(p.getContactsNameTen())){
PayWorkingGroupSubItemContacts payWorkingGroupSubItemContacts = setContactsId(msg,p.getContactsNameTen(),10,count,listCompany,listContactsInfo,map);
list.add(payWorkingGroupSubItemContacts);
}
return list;
}
private PayWorkingGroupSubItemContacts setContactsId(StringBuilder msg,String name,int num,int count,List<PayCompanyManagement> listCompany,List<PayContactsManagement> listContactsInfo,HashMap<String,Integer> map){
PayWorkingGroupSubItemContacts payWorkingGroupSubItemContacts = new PayWorkingGroupSubItemContacts();
if(map.containsKey(name)){
int c = map.get(name);
msg.append("").append(count + 3).append("行:企业联系人").append(c).append("与企业联系人").append(num).append("重复,请修改。<br/>");
}else{
map.put(name,num);
}
if (!CollectionUtils.isEmpty(listCompany)) {
// 通过联系人获取联系人id
List<PayContactsManagement> listContacts = listContactsInfo.stream().filter(item ->
Objects.equals(item.getName(), name)
&& Objects.equals(item.getCompanyId(), listCompany.get(0).getId())).collect(Collectors.toList());
if (CollectionUtils.isEmpty(listContacts)) {
msg.append("").append(count + 3).append("行:该企业下不存在企业联系人").append(num).append(",请修改。<br/>");
} else {
payWorkingGroupSubItemContacts.setContactsId(listContacts.get(0).getId());
}
}
return payWorkingGroupSubItemContacts;
}
@Override
@@ -737,6 +860,10 @@ public class PayWorkingGroupSubItemServiceImpl extends ServiceImpl<PayWorkingGro
}
deleteProject(id,"workingGroupMember:delete");
payWorkingGroupSubItemService.removeById(id);
// 删除成员企业联系人
LambdaUpdateWrapper<PayWorkingGroupSubItemContacts> updatePayWorkingGroupSubItemContacts = new LambdaUpdateWrapper<>();
updatePayWorkingGroupSubItemContacts.eq(PayWorkingGroupSubItemContacts::getWorkingGroupSubId,id);
payWorkingGroupSubItemContactsService.remove(updatePayWorkingGroupSubItemContacts);
}
@Override
@@ -753,6 +880,10 @@ public class PayWorkingGroupSubItemServiceImpl extends ServiceImpl<PayWorkingGro
deleteProject(s1,"workingGroupMember:batchDel");
}
payWorkingGroupSubItemService.removeByIds(Arrays.asList(ids.split(",")));
// 删除成员企业联系人
LambdaUpdateWrapper<PayWorkingGroupSubItemContacts> updatePayWorkingGroupSubItemContacts = new LambdaUpdateWrapper<>();
updatePayWorkingGroupSubItemContacts.in(PayWorkingGroupSubItemContacts::getWorkingGroupSubId,Arrays.asList(ids.split(",")));
payWorkingGroupSubItemContactsService.remove(updatePayWorkingGroupSubItemContacts);
}
@Override
@@ -781,29 +912,41 @@ public class PayWorkingGroupSubItemServiceImpl extends ServiceImpl<PayWorkingGro
if(!StringUtils.isBlank(input.getChargeNoticeId())){
OSSFile file = iossFileService.getById(input.getChargeNoticeId());
String path = env.getProperty("jero.path.upload") + File.separator;
File fi = new File(path + file.getUrl());
if(!fi.exists()){
throw new JeroBootException("附件不存在!");
}
listFile.add(path + file.getUrl());
}
List<PayWorkingGroupSubItem> list = payWorkingGroupSubItemService.listByIds(Arrays.asList(s));
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
List<String> listMsg = new ArrayList<>();
if(!CollectionUtils.isEmpty(list)){
List<String> listContacts = new ArrayList<>();
List<String> listOne = list.stream().map(PayWorkingGroupSubItem::getContactsTemporaryIdOne).collect(Collectors.toList());
if(!CollectionUtils.isEmpty(listOne)){
listContacts.addAll(listOne);
List<String> listStr = list.stream().map(PayWorkingGroupSubItem::getId).collect(Collectors.toList());
LambdaQueryWrapper<PayWorkingGroupSubItemContacts> queryPayWorkingGroupSubItemContacts = new LambdaQueryWrapper<>();
queryPayWorkingGroupSubItemContacts.in(PayWorkingGroupSubItemContacts::getWorkingGroupSubId,listStr);
List<PayWorkingGroupSubItemContacts> listPayWorkingGroupSubItemContacts = payWorkingGroupSubItemContactsService.list(queryPayWorkingGroupSubItemContacts);
List<PayContactsManagementTemporary> listPayContactsManagementTemporary = new ArrayList<>();
if(!CollectionUtils.isEmpty(listPayWorkingGroupSubItemContacts)){
List<String> listContacts = listPayWorkingGroupSubItemContacts.stream().map(PayWorkingGroupSubItemContacts::getContactsTemporaryId).collect(Collectors.toList());
if(!CollectionUtils.isEmpty(listContacts)){
// 获取所有联系人
listPayContactsManagementTemporary = payContactsManagementTemporaryService.listByIds(listContacts);
if(CollectionUtils.isEmpty(listPayContactsManagementTemporary)){
throw new JeroBootException("联系人不存在!");
}
}
}
List<String> listTwo = list.stream().map(PayWorkingGroupSubItem::getContactsTemporaryIdTwo).collect(Collectors.toList());
if(!CollectionUtils.isEmpty(listTwo)){
listContacts.addAll(listTwo);
List<PayContactsManagementTemporary> finalListPayContactsManagementTemporary = listPayContactsManagementTemporary;
// 获取工作组信息
PayWorkingGroup payWorkingGroup = payWorkingGroupService.getById(list.get(0).getWorkingGroupId());
if(Objects.isNull(payWorkingGroup)){
throw new JeroBootException("工作组不存在!");
}
List<String> listThree = list.stream().map(PayWorkingGroupSubItem::getContactsTemporaryIdThree).collect(Collectors.toList());
if(!CollectionUtils.isEmpty(listThree)){
listContacts.addAll(listThree);
}
// 获取所有联系人
List<PayContactsManagementTemporary> listPayContactsManagementTemporary = payContactsManagementTemporaryService.listByIds(listContacts);
if(CollectionUtils.isEmpty(listPayContactsManagementTemporary)){
throw new JeroBootException("联系人不存在!");
SysUser sysUserInfo = sysUserService.getById(payWorkingGroup.getPrincipalIdA());
if(Objects.isNull(sysUserInfo)){
throw new JeroBootException("负责人不存在!");
}
// 获取工作组信息
PayWorkingGroup payWorkingGroup = payWorkingGroupService.getById(list.get(0).getWorkingGroupId());
@@ -847,18 +990,29 @@ public class PayWorkingGroupSubItemServiceImpl extends ServiceImpl<PayWorkingGro
if(CollectionUtils.isEmpty(listFile)){
return;
}
// 发消息 项目负责人发给企业联系人、工作组1、2、3联系人
List<PayContactsManagementTemporary> listContactsOne = listPayContactsManagementTemporary.stream().filter(item->Objects.equals(p.getContactsTemporaryIdOne(),item.getId())).collect(Collectors.toList());
if(!CollectionUtils.isEmpty(listContactsOne)){
if(CollectionUtils.isEmpty(listPayWorkingGroupSubItemContacts)){
return;
}
List<PayWorkingGroupSubItemContacts> listNew = listPayWorkingGroupSubItemContacts.stream().filter(n->Objects.equals(n.getWorkingGroupSubId(),p.getId())).collect(Collectors.toList());
if(CollectionUtils.isEmpty(listNew)){
return;
}
List<String> listIds = listNew.stream().map(PayWorkingGroupSubItemContacts::getContactsTemporaryId).collect(Collectors.toList());
// 发消息 项目负责人发给企业联系人、工作组联系人
List<PayContactsManagementTemporary> listContacts = finalListPayContactsManagementTemporary.stream().filter(item->listIds.contains(item.getId())).collect(Collectors.toList());
if(CollectionUtils.isEmpty(listContacts)) {
return;
}
listContacts.forEach(m->{
try {
// 发送消息
SendMessageDTO sendMessageDTO = new SendMessageDTO();
if(!StringUtils.isBlank(listContactsOne.get(0).getEmail())){
sendMessageDTO.setEmail(PasswordUtil.decrypt(listContactsOne.get(0).getEmail()));
if(!StringUtils.isBlank(m.getEmail())){
sendMessageDTO.setEmail(PasswordUtil.decrypt(m.getEmail()));
}
if(!StringUtils.isBlank(listContactsOne.get(0).getPhone())){
sendMessageDTO.setToUser(PasswordUtil.decrypt(listContactsOne.get(0).getPhone()));
sendMessageDTO.setPhone(PasswordUtil.decrypt(listContactsOne.get(0).getPhone()));
if(!StringUtils.isBlank(m.getPhone())){
sendMessageDTO.setToUser(PasswordUtil.decrypt(m.getPhone()));
sendMessageDTO.setPhone(PasswordUtil.decrypt(m.getPhone()));
}
HashMap<String,String> map = new HashMap<>();
map.put("projectName",payWorkingGroup.getWorkingGroupProject());
@@ -872,69 +1026,11 @@ public class PayWorkingGroupSubItemServiceImpl extends ServiceImpl<PayWorkingGro
sendMessageDTO.setBusId(json.toJSONString());
sendMessageService.SendMessageService(sendMessageDTO);
}catch (Exception e){
if(e.getMessage().contains("邮件发送") && !listMsg.contains(p.getChargeCompanyTemporaryName() + "单位邮箱发送失败")){
listMsg.add(p.getChargeCompanyTemporaryName() + "单位邮箱发送失败");
if(e.getMessage().contains("邮件发送") && !listMsg.contains(p.getChargeCompanyTemporaryName() + "单位" + m.getName() + "邮箱发送失败")){
listMsg.add(p.getChargeCompanyTemporaryName() + "单位" + m.getName() + "邮箱发送失败");
}
}
}
List<PayContactsManagementTemporary> listContactsTwo = listPayContactsManagementTemporary.stream().filter(item->Objects.equals(p.getContactsTemporaryIdTwo(),item.getId())).collect(Collectors.toList());
if(!CollectionUtils.isEmpty(listContactsTwo)){
try {
// 发送消息
SendMessageDTO sendMessageDTO = new SendMessageDTO();
if(!StringUtils.isBlank(listContactsTwo.get(0).getEmail())){
sendMessageDTO.setEmail(PasswordUtil.decrypt(listContactsTwo.get(0).getEmail()));
}
if(!StringUtils.isBlank(listContactsTwo.get(0).getPhone())){
sendMessageDTO.setToUser(PasswordUtil.decrypt(listContactsTwo.get(0).getPhone()));
sendMessageDTO.setPhone(PasswordUtil.decrypt(listContactsTwo.get(0).getPhone()));
}
HashMap<String,String> map = new HashMap<>();
map.put("projectName",payWorkingGroup.getWorkingGroupProject());
sendMessageDTO.setFromUser(sysUserInfo.getUsername());
sendMessageDTO.setTemplateCode(CompanyMessageEnums.MSG22.getCode());
sendMessageDTO.setTemplateParam(map);
sendMessageDTO.setBusType("C_OPEN_TYPE22");
sendMessageDTO.setListFile(listFile);
JSONObject json = new JSONObject();
json.put("id",p.getId());
sendMessageDTO.setBusId(json.toJSONString());
sendMessageService.SendMessageService(sendMessageDTO);
}catch (Exception e){
if(e.getMessage().contains("邮件发送") && !listMsg.contains(p.getChargeCompanyTemporaryName() + "单位邮箱发送失败")){
listMsg.add(p.getChargeCompanyTemporaryName() + "单位邮箱发送失败");
}
}
}
List<PayContactsManagementTemporary> listContactsThree = listPayContactsManagementTemporary.stream().filter(item->Objects.equals(p.getContactsTemporaryIdThree(),item.getId())).collect(Collectors.toList());
if(!CollectionUtils.isEmpty(listContactsThree)){
try {
// 发送消息
SendMessageDTO sendMessageDTO = new SendMessageDTO();
if(!StringUtils.isBlank(listContactsThree.get(0).getEmail())){
sendMessageDTO.setEmail(PasswordUtil.decrypt(listContactsThree.get(0).getEmail()));
}
if(!StringUtils.isBlank(listContactsThree.get(0).getPhone())){
sendMessageDTO.setToUser(PasswordUtil.decrypt(listContactsThree.get(0).getPhone()));
sendMessageDTO.setPhone(PasswordUtil.decrypt(listContactsThree.get(0).getPhone()));
}
HashMap<String,String> map = new HashMap<>();
map.put("projectName",payWorkingGroup.getWorkingGroupProject());
sendMessageDTO.setFromUser(sysUserInfo.getUsername());
sendMessageDTO.setTemplateCode(CompanyMessageEnums.MSG22.getCode());
sendMessageDTO.setTemplateParam(map);
sendMessageDTO.setBusType("C_OPEN_TYPE22");
sendMessageDTO.setListFile(listFile);
JSONObject json = new JSONObject();
json.put("id",p.getId());
sendMessageDTO.setBusId(json.toJSONString());
sendMessageService.SendMessageService(sendMessageDTO);
}catch (Exception e){
if(e.getMessage().contains("邮件发送") && !listMsg.contains(p.getChargeCompanyTemporaryName() + "单位邮箱发送失败")){
listMsg.add(p.getChargeCompanyTemporaryName() + "单位邮箱发送失败");
}
}
}
});
});
}
return listMsg;
@@ -1004,30 +1100,17 @@ public class PayWorkingGroupSubItemServiceImpl extends ServiceImpl<PayWorkingGro
}
payWorkingGroupSubItem.setChargeCompanyTemporaryId(chargeCompanyName.getId());
payWorkingGroupSubItem.setChargeCompanyTemporaryName(chargeCompanyName.getCompanyName());
// 企业联系人1
PayContactsManagementTemporary contactsNameOne = payContactsManagementTemporaryService.insertContactsManagementTemporary(payWorkingGroupSubItem.getContactsIdOne());
if(Objects.isNull(contactsNameOne)){
throw new JeroBootException("企业联系人1名称为空!");
}
payWorkingGroupSubItem.setContactsTemporaryIdOne(contactsNameOne.getId());
payWorkingGroupSubItem.setContactsTemporaryNameOne(contactsNameOne.getName());
if(!StringUtils.isBlank(payWorkingGroupSubItem.getContactsIdTwo())){
// 企业联系人2
PayContactsManagementTemporary contactsNameTwo = payContactsManagementTemporaryService.insertContactsManagementTemporary(payWorkingGroupSubItem.getContactsIdTwo());
if(Objects.isNull(contactsNameTwo)){
throw new JeroBootException("企业联系人2名称为空!");
List<PayWorkingGroupSubItemContacts> payWorkingGroupSubItemContactsList = payWorkingGroupSubItem.getPayWorkingGroupSubItemContactsList();
if(!CollectionUtils.isEmpty(payWorkingGroupSubItemContactsList)){
for (int i = 0; i < payWorkingGroupSubItemContactsList.size(); i++) {
// 企业联系人
PayContactsManagementTemporary contactsName = payContactsManagementTemporaryService.insertContactsManagementTemporary(payWorkingGroupSubItemContactsList.get(i).getContactsId());
if(Objects.isNull(contactsName)){
throw new JeroBootException("企业联系人" + (i + 1) + "名称为空!");
}
payWorkingGroupSubItemContactsList.get(i).setContactsTemporaryId(contactsName.getId());
payWorkingGroupSubItemContactsList.get(i).setContactsTemporaryName(contactsName.getName());
}
payWorkingGroupSubItem.setContactsTemporaryIdTwo(contactsNameTwo.getId());
payWorkingGroupSubItem.setContactsTemporaryNameTwo(contactsNameTwo.getName());
}
if(!StringUtils.isBlank(payWorkingGroupSubItem.getContactsIdThree())){
// 企业联系人3
PayContactsManagementTemporary contactsNameThree = payContactsManagementTemporaryService.insertContactsManagementTemporary(payWorkingGroupSubItem.getContactsIdThree());
if(Objects.isNull(contactsNameThree)){
throw new JeroBootException("企业联系人3名称为空!");
}
payWorkingGroupSubItem.setContactsTemporaryIdThree(contactsNameThree.getId());
payWorkingGroupSubItem.setContactsTemporaryNameThree(contactsNameThree.getName());
}
// 邮寄联系人
PayContactsManagementTemporary mailContactsName = payContactsManagementTemporaryService.insertContactsManagementTemporary(payWorkingGroupSubItem.getMailContactsId());
@@ -1058,56 +1141,28 @@ public class PayWorkingGroupSubItemServiceImpl extends ServiceImpl<PayWorkingGro
}else{
payWorkingGroupSubItem.setChargeCompanyId(payWorkingGroupSubItemOld.getChargeCompanyId());
}
if(!Objects.equals(payWorkingGroupSubItemOld.getContactsTemporaryIdOne(),payWorkingGroupSubItem.getContactsIdOne())){
// 企业联系人1
PayContactsManagementTemporary contactsNameOne = payContactsManagementTemporaryService.insertContactsManagementTemporary(payWorkingGroupSubItem.getContactsIdOne());
if(Objects.isNull(contactsNameOne)){
throw new JeroBootException("企业联系人1名称为空!");
}
payWorkingGroupSubItem.setContactsTemporaryIdOne(contactsNameOne.getId());
payWorkingGroupSubItem.setContactsTemporaryNameOne(contactsNameOne.getName());
payContactsManagementTemporaryService.removeById(payWorkingGroupSubItemOld.getContactsTemporaryIdOne());
}else{
payWorkingGroupSubItem.setContactsIdOne(payWorkingGroupSubItemOld.getContactsIdOne());
}
if(!StringUtils.isBlank(payWorkingGroupSubItem.getContactsIdTwo())){
if(!Objects.equals(payWorkingGroupSubItemOld.getContactsTemporaryIdTwo(),payWorkingGroupSubItem.getContactsIdTwo())) {
// 企业联系人2
PayContactsManagementTemporary contactsNameTwo = payContactsManagementTemporaryService.insertContactsManagementTemporary(payWorkingGroupSubItem.getContactsIdTwo());
if (Objects.isNull(contactsNameTwo)) {
throw new JeroBootException("企业联系人2名称为空!");
}
payWorkingGroupSubItem.setContactsTemporaryIdTwo(contactsNameTwo.getId());
payWorkingGroupSubItem.setContactsTemporaryNameTwo(contactsNameTwo.getName());
payContactsManagementTemporaryService.removeById(payWorkingGroupSubItemOld.getContactsTemporaryIdTwo());
}else{
payWorkingGroupSubItem.setContactsIdTwo(payWorkingGroupSubItemOld.getContactsIdTwo());
List<PayWorkingGroupSubItemContacts> payWorkingGroupSubItemContactsList = payWorkingGroupSubItem.getPayWorkingGroupSubItemContactsList();
if(!CollectionUtils.isEmpty(payWorkingGroupSubItemContactsList)){
// 删除临时表历史记录
if(!CollectionUtils.isEmpty(payWorkingGroupSubItemOld.getPayWorkingGroupSubItemContactsList())){
List<String> list = payWorkingGroupSubItemOld.getPayWorkingGroupSubItemContactsList().stream().map(PayWorkingGroupSubItemContacts::getContactsTemporaryId).collect(Collectors.toList());
payContactsManagementTemporaryService.removeByIds(list);
}
}else{
payWorkingGroupSubItem.setContactsIdTwo("");
payWorkingGroupSubItem.setContactsTemporaryIdTwo("");
payWorkingGroupSubItem.setContactsTemporaryNameTwo("");
payContactsManagementTemporaryService.removeById(payWorkingGroupSubItemOld.getContactsTemporaryIdTwo());
}
if(!StringUtils.isBlank(payWorkingGroupSubItem.getContactsIdThree())){
if(!Objects.equals(payWorkingGroupSubItemOld.getContactsTemporaryIdThree(),payWorkingGroupSubItem.getContactsIdThree())) {
// 企业联系人3
PayContactsManagementTemporary contactsNameThree = payContactsManagementTemporaryService.insertContactsManagementTemporary(payWorkingGroupSubItem.getContactsIdThree());
if (Objects.isNull(contactsNameThree)) {
throw new JeroBootException("企业联系人3名称为空!");
// 删除联系人记录
LambdaUpdateWrapper<PayWorkingGroupSubItemContacts> updatePayWorkingGroupSubItemContacts = new LambdaUpdateWrapper<>();
updatePayWorkingGroupSubItemContacts.eq(PayWorkingGroupSubItemContacts::getWorkingGroupSubId,payWorkingGroupSubItem.getId());
payWorkingGroupSubItemContactsService.remove(updatePayWorkingGroupSubItemContacts);
// 新增
for (int i = 0; i < payWorkingGroupSubItemContactsList.size(); i++) {
// 企业联系人
PayContactsManagementTemporary contactsName = payContactsManagementTemporaryService.insertContactsManagementTemporary(payWorkingGroupSubItemContactsList.get(i).getContactsId());
if (Objects.isNull(contactsName)) {
throw new JeroBootException("企业联系人" + (i + 1) + "名称为空!");
}
payWorkingGroupSubItem.setContactsTemporaryIdThree(contactsNameThree.getId());
payWorkingGroupSubItem.setContactsTemporaryNameThree(contactsNameThree.getName());
payContactsManagementTemporaryService.removeById(payWorkingGroupSubItemOld.getContactsTemporaryIdThree());
}else{
payWorkingGroupSubItem.setContactsIdThree(payWorkingGroupSubItemOld.getContactsIdThree());
payWorkingGroupSubItemContactsList.get(i).setContactsTemporaryId(contactsName.getId());
payWorkingGroupSubItemContactsList.get(i).setContactsTemporaryName(contactsName.getName());
}
}else{
payWorkingGroupSubItem.setContactsTemporaryIdThree("");
payWorkingGroupSubItem.setContactsTemporaryNameThree("");
payWorkingGroupSubItem.setContactsIdThree("");
payContactsManagementTemporaryService.removeById(payWorkingGroupSubItemOld.getContactsTemporaryIdThree());
}
if(!Objects.equals(payWorkingGroupSubItemOld.getMailContactsTemporaryId(),payWorkingGroupSubItem.getMailContactsId())){
// 邮寄联系人
@@ -5,7 +5,6 @@ import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.jeecgframework.poi.excel.annotation.Excel;
import javax.validation.constraints.DecimalMax;
import java.io.Serializable;
import java.math.BigDecimal;
@@ -26,75 +25,6 @@ public class PayWorkingGroupSubItemExcel implements Serializable {
@ApiModelProperty(value = "临时成员单位")
private String chargeCompanyTemporaryName;
/**
* 临时企业联系人1名称
*/
@Excel(name = "企业联系人1", width = 15)
@ApiModelProperty(value = "临时企业联系人1名称")
private String contactsTemporaryNameOne;
/**
* 企业联系人1手机号
*/
@Excel(name = "企业联系人1手机号", width = 17)
private String contactsPhoneOne;
/**
* 企业联系人1邮箱
*/
@Excel(name = "企业联系人1邮箱", width = 15)
private String contactsEmailOne;
/**
* 联系人1备注
*/
@Excel(name = "联系人1备注", width = 15)
@ApiModelProperty(value = "联系人1备注")
private String remarksOne;
/**
* 临时企业联系人2名称
*/
@Excel(name = "企业联系人2", width = 15)
@ApiModelProperty(value = "临时企业联系人2名称")
private String contactsTemporaryNameTwo;
/**
* 企业联系人2手机号
*/
@Excel(name = "企业联系人2手机号", width = 17)
private String contactsPhoneTwo;
/**
* 企业联系人2邮箱
*/
@Excel(name = "企业联系人2邮箱", width = 15)
private String contactsEmailTwo;
/**
* 联系人2备注
*/
@Excel(name = "联系人2备注", width = 15)
@ApiModelProperty(value = "联系人2备注")
private String remarksTwo;
/**
* 临时企业联系人3名称
*/
@Excel(name = "企业联系人3", width = 15)
@ApiModelProperty(value = "临时企业联系人3名称")
private String contactsTemporaryNameThree;
/**
* 企业联系人3手机号
*/
@Excel(name = "企业联系人3手机号", width = 17)
private String contactsPhoneThree;
/**
* 企业联系人3邮箱
*/
@Excel(name = "企业联系人3邮箱", width = 15)
private String contactsEmailThree;
/**
* 联系人3备注
*/
@Excel(name = "联系人3备注", width = 15)
@ApiModelProperty(value = "联系人3备注")
private String remarksThree;
/**
* 临时邮寄联系人名称
*/
@@ -138,4 +68,227 @@ public class PayWorkingGroupSubItemExcel implements Serializable {
@Excel(name = "备注", width = 15)
@ApiModelProperty(value = "备注")
private String remarks;
/**
* 企业联系人1名称
*/
@Excel(name = "企业联系人1", width = 15)
@ApiModelProperty(value = "企业联系人1名称")
private String contactsNameOne;
/**
* 企业联系人1手机号
*/
@Excel(name = "企业联系人1手机号", width = 15)
private String contactsPhoneOne;
/**
* 企业联系人1邮箱
*/
@Excel(name = "企业联系人1邮箱", width = 15)
private String contactsEmailOne;
/**
* 联系人1备注
*/
@Excel(name = "联系人1备注", width = 15)
@ApiModelProperty(value = "联系人1备注")
private String remarksOne;
/**
* 企业联系人2名称
*/
@Excel(name = "企业联系人2", width = 15)
@ApiModelProperty(value = "企业联系人2名称")
private String contactsNameTwo;
/**
* 企业联系人2手机号
*/
@Excel(name = "企业联系人2手机号", width = 15)
private String contactsPhoneTwo;
/**
* 企业联系人2邮箱
*/
@Excel(name = "企业联系人2邮箱", width = 15)
private String contactsEmailTwo;
/**
* 联系人2备注
*/
@Excel(name = "联系人2备注", width = 15)
@ApiModelProperty(value = "联系人2备注")
private String remarksTwo;
/**
* 企业联系人3名称
*/
@Excel(name = "企业联系人3", width = 15)
@ApiModelProperty(value = "企业联系人3名称")
private String contactsNameThree;
/**
* 企业联系人3手机号
*/
@Excel(name = "企业联系人3手机号", width = 15)
private String contactsPhoneThree;
/**
* 企业联系人3邮箱
*/
@Excel(name = "企业联系人3邮箱", width = 15)
private String contactsEmailThree;
/**
* 联系人3备注
*/
@Excel(name = "联系人3备注", width = 15)
@ApiModelProperty(value = "联系人3备注")
private String remarksThree;
/**
* 企业联系人4名称
*/
@Excel(name = "企业联系人4", width = 15)
@ApiModelProperty(value = "企业联系人4名称")
private String contactsNameFour;
/**
* 企业联系人4手机号
*/
@Excel(name = "企业联系人4手机号", width = 15)
private String contactsPhoneFour;
/**
* 企业联系人4邮箱
*/
@Excel(name = "企业联系人4邮箱", width = 15)
private String contactsEmailFour;
/**
* 联系人4备注
*/
@Excel(name = "联系人4备注", width = 15)
@ApiModelProperty(value = "联系人4备注")
private String remarksFour;
/**
* 企业联系人5名称
*/
@Excel(name = "企业联系人5", width = 15)
@ApiModelProperty(value = "企业联系人5名称")
private String contactsNameFive;
/**
* 企业联系人5手机号
*/
@Excel(name = "企业联系人5手机号", width = 15)
private String contactsPhoneFive;
/**
* 企业联系人5邮箱
*/
@Excel(name = "企业联系人5邮箱", width = 15)
private String contactsEmailFive;
/**
* 联系人5备注
*/
@Excel(name = "联系人5备注", width = 15)
@ApiModelProperty(value = "联系人5备注")
private String remarksFive;
/**
* 企业联系人6名称
*/
@Excel(name = "企业联系人6", width = 15)
@ApiModelProperty(value = "企业联系人6名称")
private String contactsNameSix;
/**
* 企业联系人6手机号
*/
@Excel(name = "企业联系人6手机号", width = 15)
private String contactsPhoneSix;
/**
* 企业联系人6邮箱
*/
@Excel(name = "企业联系人6邮箱", width = 15)
private String contactsEmailSix;
/**
* 联系人6备注
*/
@Excel(name = "联系人6备注", width = 15)
@ApiModelProperty(value = "联系人6备注")
private String remarksSix;
/**
* 企业联系人7名称
*/
@Excel(name = "企业联系人7", width = 15)
@ApiModelProperty(value = "企业联系人7名称")
private String contactsNameSeven;
/**
* 企业联系人7手机号
*/
@Excel(name = "企业联系人7手机号", width = 15)
private String contactsPhoneSeven;
/**
* 企业联系人7邮箱
*/
@Excel(name = "企业联系人7邮箱", width = 15)
private String contactsEmailSeven;
/**
* 联系人7备注
*/
@Excel(name = "联系人7备注", width = 15)
@ApiModelProperty(value = "联系人7备注")
private String remarksSeven;
/**
* 企业联系人8名称
*/
@Excel(name = "企业联系人8", width = 15)
@ApiModelProperty(value = "企业联系人8名称")
private String contactsNameEight;
/**
* 企业联系人8手机号
*/
@Excel(name = "企业联系人8手机号", width = 15)
private String contactsPhoneEight;
/**
* 企业联系人8邮箱
*/
@Excel(name = "企业联系人8邮箱", width = 15)
private String contactsEmailEight;
/**
* 联系人8备注
*/
@Excel(name = "联系人8备注", width = 15)
@ApiModelProperty(value = "联系人8备注")
private String remarksEight;
/**
* 企业联系人9名称
*/
@Excel(name = "企业联系人9", width = 15)
@ApiModelProperty(value = "企业联系人9名称")
private String contactsNameNine;
/**
* 企业联系人9手机号
*/
@Excel(name = "企业联系人9手机号", width = 15)
private String contactsPhoneNine;
/**
* 企业联系人9邮箱
*/
@Excel(name = "企业联系人9邮箱", width = 15)
private String contactsEmailNine;
/**
* 联系人9备注
*/
@Excel(name = "联系人9备注", width = 15)
@ApiModelProperty(value = "联系人9备注")
private String remarksNine;
/**
* 企业联系人10名称
*/
@Excel(name = "企业联系人10", width = 15)
@ApiModelProperty(value = "企业联系人10名称")
private String contactsNameTen;
/**
* 企业联系人10手机号
*/
@Excel(name = "企业联系人10手机号", width = 15)
private String contactsPhoneTen;
/**
* 企业联系人10邮箱
*/
@Excel(name = "企业联系人10邮箱", width = 15)
private String contactsEmailTen;
/**
* 联系人10备注
*/
@Excel(name = "联系人10备注", width = 15)
@ApiModelProperty(value = "联系人10备注")
private String remarksTen;
}