Commit befd50bf authored by wangzb's avatar wangzb

feature-wzb :bug修复

parent c6b9a1fd
......@@ -583,4 +583,20 @@ public interface CommonConstants {
String CONTRACT_TYPE_TWO="无固定期限";
String CONTRACT_TYPE_ZERO="已完成一定工作任务为期限";
Integer ZERO_INTEGER = 0;
Integer ONE_INTEGER = 1;
Integer TWO_INTEGER = 2;
Integer THREE_INTEGER = 3;
Integer FOUR_INTEGER = 4;
Integer FIVE_INTEGER =5;
Integer SIX_INTEGER = 6;
Integer SEVEN_INTEGER = 7;
Integer EIGHT_INTEGER =8;
Integer NINE_INTEGER = 9;
Integer TEN_INTEGER = 10;
Integer ELEVEN_INTEGER =11;
}
......@@ -118,4 +118,23 @@ public class OrderConstants {
* 订单作废失败
*/
public static final String ORDER_INVALID_FAILED = "订单状态为待办理才可作废";
public static final String ORDER_DEPTMENT_IS_EMPTY = "下单人所在地不能为空";
public static final String ORDER_CUSTOMER_GRADE_IS_EMPTY = "客户等级不能为空";
public static final String ORDER_URGENCY_EXTENT_IS_EMPTY = "紧急程度不能为空";
public static final String ORDER_SERVICE_TYPE_IS_EMPTY = "服务类型不能为空";
public static final String ORDER_SERVICE_PROJECE_IS_EMPTY = "服务项目不能为空";
public static final String ORDER_LEVEL_IS_EMPTY = "星级不能为空";
public static final String ORDER_DEMAND_IS_EMPTY = "其他支撑需求不能为空";
public static final String ORDER_HANDLE_USER_IS_EMPTY = "指派人不能为空";
public static final String ORDER_STATUSONE_IS_EMPTY = "待客户确认后提交审核不能为空";
}
......@@ -113,4 +113,271 @@ public class TOrder implements Serializable {
@Schema(description = "星级")
private String level;
/**
* 下单人所在部门
*/
@Schema(description = "下单人所在部门")
private String department;
/**
* 客户等级
*/
@Schema(description = "客户等级")
private String customerGrade;
/**
* 紧急程度
*/
@Schema(description = "紧急程度")
private String urgencyExtent;
/**
* 服务类型
*/
@Schema(description = "服务类型")
private String serviceType;
/**
* 服务项目
*/
@Schema(description = "服务项目")
private String serviceProject;
/**
* 其他支撑需求
*/
@Schema(description = "其他支撑需求")
private String demand;
/**
* 指派人
*/
@Schema(description = "指派人")
private String handleUser;
/**
* 待客户确认后提交审核
*/
@Schema(description = "待客户确认后提交审核")
private String status;
/**
* 工资暂时停发
*/
@Schema(description = "工资暂时停发")
private String wageFlag;
/**
* 工资姓名
*/
@Schema(description = "工资姓名")
private String wageName;
/**
* 工资身份证号
*/
@Schema(description = "工资身份证号")
private String wageIdcard;
/**
* 工资费用
*/
@Schema(description = "工资费用")
private String wageExpenses;
/**
* 费用调整_薪资
*/
@Schema(description = "费用调整_薪资")
private String salaryFlag;
/**
* 薪资姓名
*/
@Schema(description = "薪资姓名")
private String salaryName;
/**
* 薪资身份证号
*/
@Schema(description = "薪资身份证号")
private String salaryIdcard;
/**
* 薪资费用
*/
@Schema(description = "薪资费用")
private String salaryExpenses;
/**
* 费用调整_社保
*/
@Schema(description = "费用调整_社保")
private String socialFlag;
/**
* 社保姓名
*/
@Schema(description = "社保姓名")
private String socialName;
/**
* 社保身份证号
*/
@Schema(description = "社保身份证号")
private String socialIdcard;
/**
* 社保费用
*/
@Schema(description = "社保费用")
private String socialExpenses;
/**
* 费用调整_公积金
*/
@Schema(description = "费用调整_公积金")
private String fundFlag;
/**
* 公积金姓名
*/
@Schema(description = "公积金姓名")
private String fundName;
/**
* 公积金身份证号
*/
@Schema(description = "公积金身份证号")
private String fundIdcard;
/**
* 公积金费用
*/
@Schema(description = "公积金费用")
private String fundExpenses;
/**
* 费用调整_商险
*/
@Schema(description = "费用调整_商险")
private String insuranceFlag;
/**
* 商险姓名
*/
@Schema(description = "商险姓名")
private String insuranceName;
/**
* 商险身份证号
*/
@Schema(description = "商险身份证号")
private String insuranceIdcard;
/**
* 商险费用
*/
@Schema(description = "商险费用")
private String insuranceExpenses;
/**
* 费用代扣
*/
@Schema(description = "代扣")
private String withholdingFlag;
/**
* 代扣名称
*/
@Schema(description = "代扣名称")
private String withholdingName;
/**
* 代扣身份证号
*/
@Schema(description = "代扣身份证号")
private String withholdingIdcard;
/**
* 代扣费用
*/
@Schema(description = "代扣费用")
private String withholdingExpenses;
/**
* 费用代收
*/
@Schema(description = "费用代收")
private String collectionFlag;
/**
* 代收姓名
*/
@Schema(description = "代收姓名")
private String collectionName;
/**
* 代收身份证号
*/
@Schema(description = "代收身份证号")
private String collectionIdcard;
/**
* 代收费用
*/
@Schema(description = "代收")
private String collectionExpenses;
/**
* 非扣税项
*/
@Schema(description = "非扣税项")
private String noTaxFlag;
/**
* 非扣税名称
*/
@Schema(description = "非扣税名称")
private String noTaxName;
/**
* 非扣税身份证号
*/
@Schema(description = "非扣税身份证号")
private String noTaxIdcard;
/**
* 非扣税费用
*/
@Schema(description = "非扣税费用")
private String noTaxExpenses;
/**
* 其他项
*/
@Schema(description = "其他项")
private String otherFlag;
/**
* 其他名称
*/
@Schema(description = "其他名称")
private String otherName;
/**
* 其他项身份证号
*/
@Schema(description = "其他项身份证号")
private String otherIdcard;
/**
* 其他项费用
*/
@Schema(description = "其他项费用")
private String otherExpenses;
}
\ No newline at end of file
......@@ -44,7 +44,7 @@ public class TOrderEnclosure implements Serializable {
private String remark;
/**
* 附件标识 0订单附件 1回复附件
* 附件标识 0订单附件 1回复附件 2工资暂停发 3费用调整-薪酬 4费用调整-社保 5费用调整-公积金 6费用调整-商险 7代扣费用 8代收费用 9非扣税项 10其他项 11薪资交接手册
*/
@JsonIgnore
private Integer enclosureFlag;
......@@ -61,5 +61,6 @@ public class TOrderEnclosure implements Serializable {
@Schema(description = "删除标识")
private Integer deleteFlag;
private static final long serialVersionUID = 1L;
}
\ No newline at end of file
......@@ -43,6 +43,8 @@ public class OrderAddVO implements Serializable {
@Schema(description = "项目名称")
private String deptName;
/**
* 订单编号
*/
......@@ -84,4 +86,340 @@ public class OrderAddVO implements Serializable {
*/
@Schema(description = "星级")
private String level;
/**
* 下单人所在部门
*/
@Schema(description = "下单人所在部门")
private String department;
/**
* 客户等级
*/
@Schema(description = "客户等级")
private String customerGrade;
/**
* 紧急程度
*/
@Schema(description = "紧急程度")
private String urgencyExtent;
/**
* 服务类型
*/
@Schema(description = "服务类型")
private String serviceType;
/**
* 服务项目
*/
@Schema(description = "服务项目")
private String serviceProject;
/**
* 其他支撑需求
*/
@Schema(description = "其他支撑需求")
private String demand;
/**
* 指派人
*/
@Schema(description = "指派人")
private String handleUser;
/**
* 待客户确认后提交审核
*/
@Schema(description = "待客户确认后提交审核")
private String status;
/**
* 费用调整_薪资
*/
@Schema(description = "费用调整_薪资")
private String salaryFlag;
/**
* 薪资姓名
*/
@Schema(description = "薪资姓名")
private String salaryName;
/**
* 薪资身份证号
*/
@Schema(description = "薪资身份证号")
private String salaryIdcard;
/**
* 薪资费用
*/
@Schema(description = "薪资费用")
private String salaryExpenses;
/**
* 工资暂时停发
*/
@Schema(description = "工资暂时停发")
private String wageFlag;
/**
* 工资姓名
*/
@Schema(description = "工资姓名")
private String wageName;
/**
* 工资身份证号
*/
@Schema(description = "工资身份证号")
private String wageIdcard;
/**
* 工资费用
*/
@Schema(description = "工资费用")
private String wageExpenses;
/**
* 费用调整_社保
*/
@Schema(description = "费用调整_社保")
private String socialFlag;
/**
* 社保姓名
*/
@Schema(description = "社保姓名")
private String socialName;
/**
* 社保身份证号
*/
@Schema(description = "社保身份证号")
private String socialIdcard;
/**
* 社保费用
*/
@Schema(description = "社保费用")
private String socialExpenses;
/**
* 费用调整_公积金
*/
@Schema(description = "费用调整_公积金")
private String fundFlag;
/**
* 公积金姓名
*/
@Schema(description = "公积金姓名")
private String fundName;
/**
* 公积金身份证号
*/
@Schema(description = "公积金身份证号")
private String fundIdcard;
/**
* 公积金费用
*/
@Schema(description = "公积金费用")
private String fundExpenses;
/**
* 费用调整_商险
*/
@Schema(description = "费用调整_商险")
private String insuranceFlag;
/**
* 商险姓名
*/
@Schema(description = "商险姓名")
private String insuranceName;
/**
* 商险身份证号
*/
@Schema(description = "商险身份证号")
private String insuranceIdcard;
/**
* 商险费用
*/
@Schema(description = "商险费用")
private String insuranceExpenses;
/**
* 费用代扣
*/
@Schema(description = "费用代扣")
private String withholdingFlag;
/**
* 代扣名称
*/
@Schema(description = "代扣名称")
private String withholdingName;
/**
* 代扣身份证号
*/
@Schema(description = "代扣身份证号")
private String withholdingIdcard;
/**
* 代扣费用
*/
@Schema(description = "代扣费用")
private String withholdingExpenses;
/**
* 费用代收
*/
@Schema(description = "费用代收")
private String collectionFlag;
/**
* 代收姓名
*/
@Schema(description = "代收姓名")
private String collectionName;
/**
* 代收身份证号
*/
@Schema(description = "代收身份证号")
private String collectionIdcard;
/**
* 代收费用
*/
@Schema(description = "代收费用")
private String collectionExpenses;
/**
* 非扣税项
*/
@Schema(description = "非扣税项")
private String noTaxFlag;
/**
* 非扣税名称
*/
@Schema(description = "非扣税名称")
private String noTaxName;
/**
* 非扣税身份证号
*/
@Schema(description = "非扣税身份证号")
private String noTaxIdcard;
/**
* 非扣税费用
*/
@Schema(description = "非扣税费用")
private String noTaxExpenses;
/**
* 其他项
*/
@Schema(description = "其他项")
private String otherFlag;
/**
* 其他名称
*/
@Schema(description = "其他名称")
private String otherName;
/**
* 其他项身份证号
*/
@Schema(description = "其他项身份证号")
private String otherIdcard;
/**
* 其他项费用
*/
@Schema(description = "其他项费用")
private String otherExpenses;
/**
* 工资附件
*/
@Schema(description = "附件")
private MultipartFile[] wageFile;
/**
* 薪资附件
*/
@Schema(description = "附件")
private MultipartFile[] salaryFile;
/**
* 社保附件
*/
@Schema(description = "附件")
private MultipartFile[] socialFile;
/**
* 公积金附件
*/
@Schema(description = "附件")
private MultipartFile[] fundFile;
/**
* 商险附件
*/
@Schema(description = "附件")
private MultipartFile[] insuranceFile;
/**
* 代扣附件
*/
@Schema(description = "代扣附件")
private MultipartFile[] withHoldingFile;
/**
* 代扣附件
*/
@Schema(description = "代收附件")
private MultipartFile[] collectionFile;
/**
* 代扣附件
*/
@Schema(description = "非扣税附件")
private MultipartFile[] noTaxFile;
/**
* 其他
*/
@Schema(description = "其他")
private MultipartFile[] otherFile;
/**
* 薪资交接手册
*/
@Schema(description = "非扣税附件")
private MultipartFile[] salaryHandoverFile;
}
......@@ -4,6 +4,7 @@ import com.fasterxml.jackson.annotation.JsonFormat;
import com.yifu.cloud.plus.v1.yifu.order.entity.TOrderEnclosure;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.springframework.web.multipart.MultipartFile;
import java.io.Serializable;
import java.time.LocalDateTime;
......@@ -68,9 +69,345 @@ public class OrderDetailVO implements Serializable {
@Schema(description = "订单内容")
private String orderContent;
/**
* 订单内容
*/
@Schema(description = "星级")
private String level;
/**
* 原始单据
*/
@Schema(description = "原始单据")
private List<TOrderEnclosure> orderEnclosure;
/**
* 下单人所在部门
*/
@Schema(description = "下单人所在部门")
private String department;
/**
* 客户等级
*/
@Schema(description = "客户等级")
private String customerGrade;
/**
* 紧急程度
*/
@Schema(description = "紧急程度")
private String urgencyExtent;
/**
* 服务类型
*/
@Schema(description = "服务类型")
private String serviceType;
/**
* 服务项目
*/
@Schema(description = "服务项目")
private String serviceProject;
/**
* 其他支撑需求
*/
@Schema(description = "其他支撑需求")
private String demand;
/**
* 指派人
*/
@Schema(description = "指派人")
private String handleUser;
/**
* 待客户确认后提交审核
*/
@Schema(description = "待客户确认后提交审核")
private String status;
/**
* 费用调整_薪资
*/
@Schema(description = "费用调整_薪资")
private String salaryFlag;
/**
* 薪资姓名
*/
@Schema(description = "薪资姓名")
private String salaryName;
/**
* 薪资身份证号
*/
@Schema(description = "薪资身份证号")
private String salaryIdcard;
/**
* 薪资费用
*/
@Schema(description = "薪资费用")
private String salaryExpenses;
/**
* 工资暂时停发
*/
@Schema(description = "工资暂时停发")
private String wageFlag;
/**
* 工资姓名
*/
@Schema(description = "工资姓名")
private String wageName;
/**
* 工资身份证号
*/
@Schema(description = "工资身份证号")
private String wageIdcard;
/**
* 工资费用
*/
@Schema(description = "工资费用")
private String wageExpenses;
/**
* 费用调整_社保
*/
@Schema(description = "费用调整_社保")
private String socialFlag;
/**
* 社保姓名
*/
@Schema(description = "社保姓名")
private String socialName;
/**
* 社保身份证号
*/
@Schema(description = "社保身份证号")
private String socialIdcard;
/**
* 社保费用
*/
@Schema(description = "社保费用")
private String socialExpenses;
/**
* 费用调整_公积金
*/
@Schema(description = "费用调整_公积金")
private String fundFlag;
/**
* 公积金姓名
*/
@Schema(description = "公积金姓名")
private String fundName;
/**
* 公积金身份证号
*/
@Schema(description = "公积金身份证号")
private String fundIdcard;
/**
* 公积金费用
*/
@Schema(description = "公积金费用")
private String fundExpenses;
/**
* 费用调整_商险
*/
@Schema(description = "费用调整_商险")
private String insuranceFlag;
/**
* 商险姓名
*/
@Schema(description = "商险姓名")
private String insuranceName;
/**
* 商险身份证号
*/
@Schema(description = "商险身份证号")
private String insuranceIdcard;
/**
* 商险费用
*/
@Schema(description = "商险费用")
private String insuranceExpenses;
/**
* 费用代扣
*/
@Schema(description = "费用代扣")
private String withholdingFlag;
/**
* 代扣名称
*/
@Schema(description = "代扣名称")
private String withholdingName;
/**
* 代扣身份证号
*/
@Schema(description = "代扣身份证号")
private String withholdingIdcard;
/**
* 代扣费用
*/
@Schema(description = "代扣费用")
private String withholdingExpenses;
/**
* 费用代收
*/
@Schema(description = "费用代收")
private String collectionFlag;
/**
* 代收姓名
*/
@Schema(description = "代收姓名")
private String collectionName;
/**
* 代收身份证号
*/
@Schema(description = "代收身份证号")
private String collectionIdcard;
/**
* 代收费用
*/
@Schema(description = "代收费用")
private String collectionExpenses;
/**
* 非扣税项
*/
@Schema(description = "非扣税项")
private String noTaxFlag;
/**
* 非扣税名称
*/
@Schema(description = "非扣税名称")
private String noTaxName;
/**
* 非扣税身份证号
*/
@Schema(description = "非扣税身份证号")
private String noTaxIdcard;
/**
* 非扣税费用
*/
@Schema(description = "非扣税费用")
private String noTaxExpenses;
/**
* 其他项
*/
@Schema(description = "其他项")
private String otherFlag;
/**
* 其他名称
*/
@Schema(description = "其他名称")
private String otherName;
/**
* 其他项身份证号
*/
@Schema(description = "其他项身份证号")
private String otherIdcard;
/**
* 其他项费用
*/
@Schema(description = "其他项费用")
private String otherExpenses;
/**
* 原始单据
*/
@Schema(description = "工资暂停发附件")
private List<TOrderEnclosure> wageEnclosure;
/**
* 原始单据
*/
@Schema(description = "费用调整-薪酬附件")
private List<TOrderEnclosure> salaryEnclosure;
/**
* 原始单据
*/
@Schema(description = "费用调整-社保附件")
private List<TOrderEnclosure>socialEnclosure;
/**
* 原始单据
*/
@Schema(description = "费用调整公积金附件")
private List<TOrderEnclosure> fundEnclosure;
/**
* 原始单据
*/
@Schema(description = "费用调整商险附件")
private List<TOrderEnclosure> insuranceEnclosure;
/**
* 原始单据
*/
@Schema(description = "代扣费用附件")
private List<TOrderEnclosure> withHoldingEnclosure;
/**
* 星级
*/
@Schema(description = "代收费用附件")
private List<TOrderEnclosure> collectionEnclosure;
/**
* 非扣税项
*/
@Schema(description = "非扣税项附件")
private List<TOrderEnclosure> noTaxEnclosure;
/**
* 非扣税项
*/
@Schema(description = "其他项附件")
private List<TOrderEnclosure> otherEnclosure;
/**
* 非扣税项
*/
@Schema(description = "薪资交接附件")
private List<TOrderEnclosure> salaryHandoverEnclosure;
}
......@@ -48,6 +48,7 @@ import java.io.IOException;
import java.net.URL;
import java.time.LocalDateTime;
import java.util.*;
import java.util.stream.Collectors;
/**
* @author licancan
......@@ -210,25 +211,97 @@ public class TOrderServiceImpl extends ServiceImpl<TOrderMapper, TOrder> impleme
*/
@Override
public R<OrderDetailVO> getOrderDetailById(String id) {
if (StringUtils.isEmpty(id)){
if (StringUtils.isEmpty(id)) {
return R.failed(OrderConstants.ORDER_ID_IS_EMPTY);
}
OrderDetailVO orderDetailVO = this.baseMapper.getOrderDetailById(id);
//处理订单附件
if (Optional.ofNullable(orderDetailVO).isPresent()){
if (Optional.ofNullable(orderDetailVO).isPresent()) {
List<TOrderEnclosure> list = tOrderEnclosureService.list(Wrappers.<TOrderEnclosure>query().lambda()
.eq(TOrderEnclosure::getOrderNo, orderDetailVO.getOrderNo())
.eq(TOrderEnclosure::getEnclosureFlag,CommonConstants.ZERO_INT)
.eq(TOrderEnclosure::getDeleteFlag,CommonConstants.ZERO_INT)
.eq(TOrderEnclosure::getDeleteFlag, CommonConstants.ZERO_INT)
);
if (CollectionUtils.isNotEmpty(list)){
orderDetailVO.setOrderEnclosure(list);
}else {
orderDetailVO.setOrderEnclosure(Lists.newArrayList());
if (CollectionUtils.isNotEmpty(list)) {
List<TOrderEnclosure> listOld = list.stream().filter(e -> CommonConstants.ZERO_INTEGER.equals(e.getEnclosureFlag())).collect(Collectors.toList());
List<TOrderEnclosure> wageList = list.stream().filter(e -> CommonConstants.TWO_INTEGER.equals(e.getEnclosureFlag())).collect(Collectors.toList());
List<TOrderEnclosure> salaryList = list.stream().filter(e -> CommonConstants.THREE_INTEGER.equals(e.getEnclosureFlag())).collect(Collectors.toList());
List<TOrderEnclosure> socialList = list.stream().filter(e -> CommonConstants.FOUR_INTEGER.equals(e.getEnclosureFlag())).collect(Collectors.toList());
List<TOrderEnclosure> fundList = list.stream().filter(e -> CommonConstants.FIVE_INTEGER.equals(e.getEnclosureFlag())).collect(Collectors.toList());
List<TOrderEnclosure> insuranceList = list.stream().filter(e -> CommonConstants.SIX_INTEGER.equals(e.getEnclosureFlag())).collect(Collectors.toList());
List<TOrderEnclosure> withHoldingList = list.stream().filter(e -> CommonConstants.SEVEN_INTEGER.equals(e.getEnclosureFlag())).collect(Collectors.toList());
List<TOrderEnclosure> collectionList = list.stream().filter(e -> CommonConstants.EIGHT_INTEGER.equals(e.getEnclosureFlag())).collect(Collectors.toList());
List<TOrderEnclosure> noTaxList = list.stream().filter(e -> CommonConstants.NINE_INTEGER.equals(e.getEnclosureFlag())).collect(Collectors.toList());
List<TOrderEnclosure> otherList = list.stream().filter(e -> CommonConstants.TEN_INTEGER.equals(e.getEnclosureFlag())).collect(Collectors.toList());
List<TOrderEnclosure> salaryHandoverList = list.stream().filter(e -> CommonConstants.ELEVEN_INTEGER.equals(e.getEnclosureFlag())).collect(Collectors.toList());
if (CollectionUtils.isNotEmpty(listOld)) {
orderDetailVO.setOrderEnclosure(listOld);
} else {
orderDetailVO.setOrderEnclosure(Lists.newArrayList());
}
if (CollectionUtils.isNotEmpty(wageList)) {
orderDetailVO.setWageEnclosure(wageList);
} else {
orderDetailVO.setWageEnclosure(Lists.newArrayList());
}
if (CollectionUtils.isNotEmpty(salaryList)) {
orderDetailVO.setSalaryEnclosure(salaryList);
} else {
orderDetailVO.setSalaryEnclosure(Lists.newArrayList());
}
if (CollectionUtils.isNotEmpty(socialList)) {
orderDetailVO.setSocialEnclosure(socialList);
} else {
orderDetailVO.setSocialEnclosure(Lists.newArrayList());
}
if (CollectionUtils.isNotEmpty(fundList)) {
orderDetailVO.setFundEnclosure(fundList);
} else {
orderDetailVO.setFundEnclosure(Lists.newArrayList());
}
if (CollectionUtils.isNotEmpty(insuranceList)) {
orderDetailVO.setInsuranceEnclosure(insuranceList);
} else {
orderDetailVO.setInsuranceEnclosure(Lists.newArrayList());
}
if (CollectionUtils.isNotEmpty(withHoldingList)) {
orderDetailVO.setWithHoldingEnclosure(withHoldingList);
} else {
orderDetailVO.setFundEnclosure(Lists.newArrayList());
}
if (CollectionUtils.isNotEmpty(collectionList)) {
orderDetailVO.setCollectionEnclosure(collectionList);
} else {
orderDetailVO.setFundEnclosure(Lists.newArrayList());
}
if (CollectionUtils.isNotEmpty(noTaxList)) {
orderDetailVO.setCollectionEnclosure(noTaxList);
} else {
orderDetailVO.setNoTaxEnclosure(Lists.newArrayList());
}
if (CollectionUtils.isNotEmpty(otherList)) {
orderDetailVO.setOtherEnclosure(otherList);
} else {
orderDetailVO.setOtherEnclosure(Lists.newArrayList());
}
if (CollectionUtils.isNotEmpty(salaryHandoverList)) {
orderDetailVO.setSalaryHandoverEnclosure(salaryHandoverList);
} else {
orderDetailVO.setSalaryHandoverEnclosure(Lists.newArrayList());
}
}
}
return R.ok(orderDetailVO);
}
return R.ok(orderDetailVO);
}
/**
* 附件预览下载地址
......@@ -493,9 +566,284 @@ public class TOrderServiceImpl extends ServiceImpl<TOrderMapper, TOrder> impleme
}
}
}
if (save && ArrayUtils.isNotEmpty(vo.getWageFile())){
for (MultipartFile multipartFile : vo.getWageFile()) {
String fileName = System.currentTimeMillis() + "_" + multipartFile.getOriginalFilename();
//filePath不传默认存储空间的根目录
//支持的附件格式
String key = fileName;
boolean flag = ossUtil.uploadFileByStream(multipartFile.getInputStream(), key, null);
if (flag) {
log.info("文件:" + fileName + "上传至存储空间" + ossUtil.getBucketName() + "成功!");
TOrderEnclosure orderEnclosure = new TOrderEnclosure();
orderEnclosure.setOrderNo(order.getOrderNo());
orderEnclosure.setEnclosureName(multipartFile.getOriginalFilename());
orderEnclosure.setEnclosureFlag(CommonConstants.TWO_INTEGER);
orderEnclosure.setEnclosureAddress(key);
orderEnclosure.setDeleteFlag(CommonConstants.ZERO_INT);
try {
tOrderEnclosureService.save(orderEnclosure);
} catch (Exception e) {
log.error("订单接收OSS文件上传接口异常:" + e.getMessage());
ossUtil.deleteObject(null, key);
return R.failed("failed:" + e.getMessage());
}
} else {
return R.failed(OrderConstants.OPERATE_FAILED);
}
}
}
if (save && ArrayUtils.isNotEmpty(vo.getSalaryFile())){
for (MultipartFile multipartFile : vo.getWageFile()) {
String fileName = System.currentTimeMillis() + "_" + multipartFile.getOriginalFilename();
//filePath不传默认存储空间的根目录
//支持的附件格式
String key = fileName;
boolean flag = ossUtil.uploadFileByStream(multipartFile.getInputStream(), key, null);
if (flag) {
log.info("文件:" + fileName + "上传至存储空间" + ossUtil.getBucketName() + "成功!");
TOrderEnclosure orderEnclosure = new TOrderEnclosure();
orderEnclosure.setOrderNo(order.getOrderNo());
orderEnclosure.setEnclosureName(multipartFile.getOriginalFilename());
orderEnclosure.setEnclosureFlag(CommonConstants.THREE_INTEGER);
orderEnclosure.setEnclosureAddress(key);
orderEnclosure.setDeleteFlag(CommonConstants.ZERO_INT);
try {
tOrderEnclosureService.save(orderEnclosure);
} catch (Exception e) {
log.error("订单接收OSS文件上传接口异常:" + e.getMessage());
ossUtil.deleteObject(null, key);
return R.failed("failed:" + e.getMessage());
}
} else {
return R.failed(OrderConstants.OPERATE_FAILED);
}
}
}
if (save && ArrayUtils.isNotEmpty(vo.getSocialFile())){
for (MultipartFile multipartFile : vo.getSocialFile()) {
String fileName = System.currentTimeMillis() + "_" + multipartFile.getOriginalFilename();
//filePath不传默认存储空间的根目录
//支持的附件格式
String key = fileName;
boolean flag = ossUtil.uploadFileByStream(multipartFile.getInputStream(), key, null);
if (flag) {
log.info("文件:" + fileName + "上传至存储空间" + ossUtil.getBucketName() + "成功!");
TOrderEnclosure orderEnclosure = new TOrderEnclosure();
orderEnclosure.setOrderNo(order.getOrderNo());
orderEnclosure.setEnclosureName(multipartFile.getOriginalFilename());
orderEnclosure.setEnclosureFlag(CommonConstants.FOUR_INTEGER);
orderEnclosure.setEnclosureAddress(key);
orderEnclosure.setDeleteFlag(CommonConstants.ZERO_INT);
try {
tOrderEnclosureService.save(orderEnclosure);
} catch (Exception e) {
log.error("订单接收OSS文件上传接口异常:" + e.getMessage());
ossUtil.deleteObject(null, key);
return R.failed("failed:" + e.getMessage());
}
} else {
return R.failed(OrderConstants.OPERATE_FAILED);
}
}
}
if (save && ArrayUtils.isNotEmpty(vo.getFundFile())){
for (MultipartFile multipartFile : vo.getFundFile()) {
String fileName = System.currentTimeMillis() + "_" + multipartFile.getOriginalFilename();
//filePath不传默认存储空间的根目录
//支持的附件格式
String key = fileName;
boolean flag = ossUtil.uploadFileByStream(multipartFile.getInputStream(), key, null);
if (flag) {
log.info("文件:" + fileName + "上传至存储空间" + ossUtil.getBucketName() + "成功!");
TOrderEnclosure orderEnclosure = new TOrderEnclosure();
orderEnclosure.setOrderNo(order.getOrderNo());
orderEnclosure.setEnclosureName(multipartFile.getOriginalFilename());
orderEnclosure.setEnclosureFlag(CommonConstants.FIVE_INTEGER);
orderEnclosure.setEnclosureAddress(key);
orderEnclosure.setDeleteFlag(CommonConstants.ZERO_INT);
try {
tOrderEnclosureService.save(orderEnclosure);
} catch (Exception e) {
log.error("订单接收OSS文件上传接口异常:" + e.getMessage());
ossUtil.deleteObject(null, key);
return R.failed("failed:" + e.getMessage());
}
} else {
return R.failed(OrderConstants.OPERATE_FAILED);
}
}
}
if (save && ArrayUtils.isNotEmpty(vo.getInsuranceFile())){
for (MultipartFile multipartFile : vo.getInsuranceFile()) {
String fileName = System.currentTimeMillis() + "_" + multipartFile.getOriginalFilename();
//filePath不传默认存储空间的根目录
//支持的附件格式
String key = fileName;
boolean flag = ossUtil.uploadFileByStream(multipartFile.getInputStream(), key, null);
if (flag) {
log.info("文件:" + fileName + "上传至存储空间" + ossUtil.getBucketName() + "成功!");
TOrderEnclosure orderEnclosure = new TOrderEnclosure();
orderEnclosure.setOrderNo(order.getOrderNo());
orderEnclosure.setEnclosureName(multipartFile.getOriginalFilename());
orderEnclosure.setEnclosureFlag(CommonConstants.SIX_INTEGER);
orderEnclosure.setEnclosureAddress(key);
orderEnclosure.setDeleteFlag(CommonConstants.ZERO_INT);
try {
tOrderEnclosureService.save(orderEnclosure);
} catch (Exception e) {
log.error("订单接收OSS文件上传接口异常:" + e.getMessage());
ossUtil.deleteObject(null, key);
return R.failed("failed:" + e.getMessage());
}
} else {
return R.failed(OrderConstants.OPERATE_FAILED);
}
}
}
if (save && ArrayUtils.isNotEmpty(vo.getWithHoldingFile())){
for (MultipartFile multipartFile : vo.getWithHoldingFile()) {
String fileName = System.currentTimeMillis() + "_" + multipartFile.getOriginalFilename();
//filePath不传默认存储空间的根目录
//支持的附件格式
String key = fileName;
boolean flag = ossUtil.uploadFileByStream(multipartFile.getInputStream(), key, null);
if (flag) {
log.info("文件:" + fileName + "上传至存储空间" + ossUtil.getBucketName() + "成功!");
TOrderEnclosure orderEnclosure = new TOrderEnclosure();
orderEnclosure.setOrderNo(order.getOrderNo());
orderEnclosure.setEnclosureName(multipartFile.getOriginalFilename());
orderEnclosure.setEnclosureFlag(CommonConstants.SEVEN_INTEGER);
orderEnclosure.setEnclosureAddress(key);
orderEnclosure.setDeleteFlag(CommonConstants.ZERO_INT);
try {
tOrderEnclosureService.save(orderEnclosure);
} catch (Exception e) {
log.error("订单接收OSS文件上传接口异常:" + e.getMessage());
ossUtil.deleteObject(null, key);
return R.failed("failed:" + e.getMessage());
}
} else {
return R.failed(OrderConstants.OPERATE_FAILED);
}
}
}
if (save && ArrayUtils.isNotEmpty(vo.getCollectionFile())){
for (MultipartFile multipartFile : vo.getCollectionFile()) {
String fileName = System.currentTimeMillis() + "_" + multipartFile.getOriginalFilename();
//filePath不传默认存储空间的根目录
//支持的附件格式
String key = fileName;
boolean flag = ossUtil.uploadFileByStream(multipartFile.getInputStream(), key, null);
if (flag) {
log.info("文件:" + fileName + "上传至存储空间" + ossUtil.getBucketName() + "成功!");
TOrderEnclosure orderEnclosure = new TOrderEnclosure();
orderEnclosure.setOrderNo(order.getOrderNo());
orderEnclosure.setEnclosureName(multipartFile.getOriginalFilename());
orderEnclosure.setEnclosureFlag(CommonConstants.EIGHT_INTEGER);
orderEnclosure.setEnclosureAddress(key);
orderEnclosure.setDeleteFlag(CommonConstants.ZERO_INT);
try {
tOrderEnclosureService.save(orderEnclosure);
} catch (Exception e) {
log.error("订单接收OSS文件上传接口异常:" + e.getMessage());
ossUtil.deleteObject(null, key);
return R.failed("failed:" + e.getMessage());
}
} else {
return R.failed(OrderConstants.OPERATE_FAILED);
}
}
}
if (save && ArrayUtils.isNotEmpty(vo.getNoTaxFile())){
for (MultipartFile multipartFile : vo.getNoTaxFile()) {
String fileName = System.currentTimeMillis() + "_" + multipartFile.getOriginalFilename();
//filePath不传默认存储空间的根目录
//支持的附件格式
String key = fileName;
boolean flag = ossUtil.uploadFileByStream(multipartFile.getInputStream(), key, null);
if (flag) {
log.info("文件:" + fileName + "上传至存储空间" + ossUtil.getBucketName() + "成功!");
TOrderEnclosure orderEnclosure = new TOrderEnclosure();
orderEnclosure.setOrderNo(order.getOrderNo());
orderEnclosure.setEnclosureName(multipartFile.getOriginalFilename());
orderEnclosure.setEnclosureFlag(CommonConstants.NINE_INTEGER);
orderEnclosure.setEnclosureAddress(key);
orderEnclosure.setDeleteFlag(CommonConstants.ZERO_INT);
try {
tOrderEnclosureService.save(orderEnclosure);
} catch (Exception e) {
log.error("订单接收OSS文件上传接口异常:" + e.getMessage());
ossUtil.deleteObject(null, key);
return R.failed("failed:" + e.getMessage());
}
} else {
return R.failed(OrderConstants.OPERATE_FAILED);
}
}
}
if (save && ArrayUtils.isNotEmpty(vo.getOtherFile())){
for (MultipartFile multipartFile : vo.getOtherFile()) {
String fileName = System.currentTimeMillis() + "_" + multipartFile.getOriginalFilename();
//filePath不传默认存储空间的根目录
//支持的附件格式
String key = fileName;
boolean flag = ossUtil.uploadFileByStream(multipartFile.getInputStream(), key, null);
if (flag) {
log.info("文件:" + fileName + "上传至存储空间" + ossUtil.getBucketName() + "成功!");
TOrderEnclosure orderEnclosure = new TOrderEnclosure();
orderEnclosure.setOrderNo(order.getOrderNo());
orderEnclosure.setEnclosureName(multipartFile.getOriginalFilename());
orderEnclosure.setEnclosureFlag(CommonConstants.TEN_INTEGER);
orderEnclosure.setEnclosureAddress(key);
orderEnclosure.setDeleteFlag(CommonConstants.ZERO_INT);
try {
tOrderEnclosureService.save(orderEnclosure);
} catch (Exception e) {
log.error("订单接收OSS文件上传接口异常:" + e.getMessage());
ossUtil.deleteObject(null, key);
return R.failed("failed:" + e.getMessage());
}
} else {
return R.failed(OrderConstants.OPERATE_FAILED);
}
}
}
if (save && ArrayUtils.isNotEmpty(vo.getSalaryHandoverFile())){
for (MultipartFile multipartFile : vo.getOtherFile()) {
String fileName = System.currentTimeMillis() + "_" + multipartFile.getOriginalFilename();
//filePath不传默认存储空间的根目录
//支持的附件格式
String key = fileName;
boolean flag = ossUtil.uploadFileByStream(multipartFile.getInputStream(), key, null);
if (flag) {
log.info("文件:" + fileName + "上传至存储空间" + ossUtil.getBucketName() + "成功!");
TOrderEnclosure orderEnclosure = new TOrderEnclosure();
orderEnclosure.setOrderNo(order.getOrderNo());
orderEnclosure.setEnclosureName(multipartFile.getOriginalFilename());
orderEnclosure.setEnclosureFlag(CommonConstants.ELEVEN_INTEGER);
orderEnclosure.setEnclosureAddress(key);
orderEnclosure.setDeleteFlag(CommonConstants.ZERO_INT);
try {
tOrderEnclosureService.save(orderEnclosure);
} catch (Exception e) {
log.error("订单接收OSS文件上传接口异常:" + e.getMessage());
ossUtil.deleteObject(null, key);
return R.failed("failed:" + e.getMessage());
}
} else {
return R.failed(OrderConstants.OPERATE_FAILED);
}
}
}
return R.ok(OrderConstants.OPERATE_SUCCESS);
}
/**
* 接收处理ekp订单回复
*
......
......@@ -3,31 +3,90 @@
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yifu.cloud.plus.v1.yifu.order.mapper.TOrderMapper">
<resultMap id="BaseResultMap" type="com.yifu.cloud.plus.v1.yifu.order.entity.TOrder">
<id property="id" column="ID" jdbcType="VARCHAR"/>
<result property="orderNo" column="ORDER_NO" jdbcType="VARCHAR"/>
<result property="customerName" column="CUSTOMER_NAME" jdbcType="VARCHAR"/>
<result property="deptName" column="DEPT_NAME" jdbcType="VARCHAR"/>
<result property="deptNo" column="DEPT_NO" jdbcType="VARCHAR"/>
<result property="orderStatus" column="ORDER_STATUS" jdbcType="TINYINT"/>
<result property="orderContent" column="ORDER_CONTENT" jdbcType="VARCHAR"/>
<result property="createName" column="CREATE_NAME" jdbcType="VARCHAR"/>
<result property="createTime" column="CREATE_TIME" jdbcType="TIMESTAMP"/>
<result property="updateBy" column="UPDATE_BY" jdbcType="VARCHAR"/>
<result property="updateName" column="UPDATE_NAME" jdbcType="VARCHAR"/>
<resultMap id="BaseResultMap" type="com.yifu.cloud.plus.v1.yifu.order.entity.TOrder">
<result property="id" column="ID" jdbcType="VARCHAR"/>
<result property="orderNo" column="ORDER_NO" jdbcType="VARCHAR"/>
<result property="customerName" column="CUSTOMER_NAME" jdbcType="VARCHAR"/>
<result property="deptId" column="DEPT_ID" jdbcType="VARCHAR"/>
<result property="deptName" column="DEPT_NAME" jdbcType="VARCHAR"/>
<result property="deptNo" column="DEPT_NO" jdbcType="VARCHAR"/>
<result property="orderStatus" column="ORDER_STATUS" jdbcType="TINYINT"/>
<result property="orderContent" column="ORDER_CONTENT" jdbcType="VARCHAR"/>
<result property="createName" column="CREATE_NAME" jdbcType="VARCHAR"/>
<result property="createTime" column="CREATE_TIME" jdbcType="TIMESTAMP"/>
<result property="updateBy" column="UPDATE_BY" jdbcType="VARCHAR"/>
<result property="updateName" column="UPDATE_NAME" jdbcType="VARCHAR"/>
<result property="updateTime" column="UPDATE_TIME" jdbcType="TIMESTAMP"/>
<result property="deleteFlag" column="DELETE_FLAG" jdbcType="TINYINT"/>
<result property="level" column="LEVEL" jdbcType="VARCHAR"/>
<result property="updateTime" column="UPDATE_TIME" jdbcType="TIMESTAMP"/>
<result property="deleteFlag" column="DELETE_FLAG" jdbcType="TINYINT"/>
</resultMap>
<result property="department" column="DEPARTMENT" jdbcType="VARCHAR"/>
<result property="customerGrade" column="CUSTOMER_GRADE" jdbcType="VARCHAR"/>
<result property="urgencyExtent" column="URGENCY_EXTENT" jdbcType="VARCHAR"/>
<result property="serviceType" column="SERVICE_TYPE" jdbcType="VARCHAR"/>
<result property="serviceProject" column="SERVICE_PROJECT" jdbcType="VARCHAR"/>
<result property="demand" column="DEMAND" jdbcType="VARCHAR"/>
<result property="handleUser" column="HANDLE_USER" jdbcType="VARCHAR"/>
<result property="status" column="STATUS" jdbcType="VARCHAR"/>
<result property="salaryFlag" column="SALARY_FLAG" jdbcType="VARCHAR"/>
<result property="salaryName" column="SALARY_NAME" jdbcType="VARCHAR"/>
<result property="salaryIdcard" column="SALARY_IDCARD" jdbcType="VARCHAR"/>
<result property="salaryExpenses" column="SALARY_EXPENSES" jdbcType="VARCHAR"/>
<result property="wageFlag" column="WAGE_FLAG" jdbcType="VARCHAR"/>
<result property="wageName" column="WAGE_NAME" jdbcType="VARCHAR"/>
<result property="wageIdcard" column="WAGE_IDCARD" jdbcType="VARCHAR"/>
<result property="wageExpenses" column="WAGE_EXPENSES" jdbcType="VARCHAR"/>
<result property="socialFlag" column="SOCIAL_FLAG" jdbcType="VARCHAR"/>
<result property="socialName" column="SOCIAL_NAME" jdbcType="VARCHAR"/>
<result property="socialIdcard" column="SOCIAL_IDCARD" jdbcType="VARCHAR"/>
<result property="socialExpenses" column="SOCIAL_EXPENSES" jdbcType="VARCHAR"/>
<result property="fundFlag" column="FUND_FLAG" jdbcType="VARCHAR"/>
<result property="fundName" column="FUND_NAME" jdbcType="VARCHAR"/>
<result property="fundIdcard" column="FUND_IDCARD" jdbcType="VARCHAR"/>
<result property="fundExpenses" column="FUND_EXPENSES" jdbcType="VARCHAR"/>
<result property="insuranceFlag" column="INSURANCE_FLAG" jdbcType="VARCHAR"/>
<result property="insuranceName" column="INSURANCE_NAME" jdbcType="VARCHAR"/>
<result property="insuranceIdcard" column="INSURANCE_IDCARD" jdbcType="VARCHAR"/>
<result property="insuranceExpenses" column="INSURANCE_EXPENSES" jdbcType="VARCHAR"/>
<result property="withholdingFlag" column="WITHHOLDING_FLAG" jdbcType="VARCHAR"/>
<result property="withholdingName" column="WITHHOLDING_NAME" jdbcType="VARCHAR"/>
<result property="withholdingIdcard" column="WITHHOLDING_IDCARD" jdbcType="VARCHAR"/>
<result property="withholdingExpenses" column="WITHHOLDING_EXPENSES" jdbcType="VARCHAR"/>
<result property="collectionFlag" column="COLLECTION_FLAG" jdbcType="VARCHAR"/>
<result property="collectionName" column="COLLECTION_NAME" jdbcType="VARCHAR"/>
<result property="collectionIdcard" column="COLLECTION_IDCARD" jdbcType="VARCHAR"/>
<result property="collectionExpenses" column="COLLECTION_EXPENSES" jdbcType="VARCHAR"/>
<result property="noTaxFlag" column="NO_TAX_FLAG" jdbcType="VARCHAR"/>
<result property="noTaxName" column="NO_TAX_NAME" jdbcType="VARCHAR"/>
<result property="noTaxIdcard" column="NO_TAX_IDCARD" jdbcType="VARCHAR"/>
<result property="noTaxExpenses" column="NO_TAX_EXPENSES" jdbcType="VARCHAR"/>
<result property="otherFlag" column="OTHER_FLAG" jdbcType="VARCHAR"/>
<result property="otherName" column="OTHER_NAME" jdbcType="VARCHAR"/>
<result property="otherIdcard" column="OTHER_IDCARD" jdbcType="VARCHAR"/>
<result property="otherExpenses" column="OTHER_EXPENSES" jdbcType="VARCHAR"/>
</resultMap>
<sql id="Base_Column_List">
ID,ORDER_NO,CUSTOMER_NAME,LEVEL,
DEPT_NAME,DEPT_NO,ORDER_STATUS,
ORDER_CONTENT,CREATE_NAME,CREATE_TIME,
UPDATE_BY,UPDATE_NAME,UPDATE_TIME,
DELETE_FLAG
</sql>
<sql id="Base_Column_List">
ID,ORDER_NO,CUSTOMER_NAME,
DEPT_ID,DEPT_NAME,DEPT_NO,
ORDER_STATUS,ORDER_CONTENT,CREATE_NAME,
CREATE_TIME,UPDATE_BY,UPDATE_NAME,
UPDATE_TIME,DELETE_FLAG,LEVEL,
DEPARTMENT,CUSTOMER_GRADE,URGENCY_EXTENT,
SERVICE_TYPE,SERVICE_PROJECT,DEMAND,
HANDLE_USER,STATUS,SALARY_FLAG,
SALARY_NAME,SALARY_IDCARD,SALARY_EXPENSES,
WAGE_FLAG,WAGE_NAME,WAGE_IDCARD,
WAGE_EXPENSES,SOCIAL_FLAG,SOCIAL_NAME,
SOCIAL_IDCARD,SOCIAL_EXPENSES,FUND_FLAG,
FUND_NAME,FUND_IDCARD,FUND_EXPENSES,
INSURANCE_FLAG,INSURANCE_NAME,INSURANCE_IDCARD,
INSURANCE_EXPENSES,WITHHOLDING_FLAG,WITHHOLDING_NAME,
WITHHOLDING_IDCARD,WITHHOLDING_EXPENSES,COLLECTION_FLAG,
COLLECTION_NAME,COLLECTION_IDCARD,COLLECTION_EXPENSES,
NO_TAX_FLAG,NO_TAX_NAME,NO_TAX_IDCARD,
NO_TAX_EXPENSES,OTHER_FLAG,OTHER_NAME,
OTHER_IDCARD,OTHER_EXPENSES
</sql>
<select id="getOrderPageList" resultType="com.yifu.cloud.plus.v1.yifu.order.vo.OrderListVO">
select a.id as id,
......@@ -137,15 +196,7 @@
<select id="getOrderDetailById" resultType="com.yifu.cloud.plus.v1.yifu.order.vo.OrderDetailVO">
select
t.CREATE_NAME as createName,
t.CREATE_TIME as createTime,
t.DEPT_NO as deptNo,
t.DEPT_NAME as deptName,
t.ORDER_NO as orderNo,
t.CUSTOMER_NAME as customerName,
t.ORDER_STATUS as orderStatus,
t.LEVEL as level,
t.ORDER_CONTENT as orderContent
t.*
from t_order t
where t.ID = #{id}
</select>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment