Commit 3b0a058b by huluobin

1、 cost/list/getCostDetail 这个接口需要返回这两个字段

2、cost/list/getAllCost 这个接口需要支持选多个项目一起查询,中间用逗号隔开
3、cost/list/reset/resetNoFile 这个接口增加保存项目和客户编号字段
4、推送到财务接口增加项目和客户编号字段推送,项目=ItemColumn,客户编号=CustomerCode
5、cost/list/reset/resetFile 这个接口增加保存项目和客户编号字段
parent bb49f110
...@@ -16,6 +16,7 @@ import java.util.List; ...@@ -16,6 +16,7 @@ import java.util.List;
public interface CostDao { public interface CostDao {
/** /**
* insert 费用单记录 * insert 费用单记录
*
* @param costDomain * @param costDomain
* @return * @return
*/ */
...@@ -24,10 +25,11 @@ public interface CostDao { ...@@ -24,10 +25,11 @@ public interface CostDao {
/** /**
* 获取费用单列表 * 获取费用单列表
*/ */
List<CostDomain> selectAll(@Param("userId") Integer userId); List<CostDomain> selectAll(@Param("userId") Integer userId, @Param("projectTypeList") List<String> projectTypeList);
/** /**
* 根据 costNo 获取费用单详情 * 根据 costNo 获取费用单详情
*
* @param costNo * @param costNo
* @return * @return
*/ */
...@@ -35,6 +37,7 @@ public interface CostDao { ...@@ -35,6 +37,7 @@ public interface CostDao {
/** /**
* 修改费用单信息 * 修改费用单信息
*
* @param costDomain * @param costDomain
* @return * @return
*/ */
...@@ -42,12 +45,14 @@ public interface CostDao { ...@@ -42,12 +45,14 @@ public interface CostDao {
/** /**
* 获取 status >= costStatus(param) 的费用单 * 获取 status >= costStatus(param) 的费用单
*
* @return * @return
*/ */
List<CostDomain> selectByStatus(Integer costStatus); List<CostDomain> selectByStatus(Integer costStatus);
/** /**
* 根据借支类型获取费用列表 * 根据借支类型获取费用列表
*
* @param isLend * @param isLend
* @return * @return
*/ */
...@@ -55,6 +60,7 @@ public interface CostDao { ...@@ -55,6 +60,7 @@ public interface CostDao {
/** /**
* 根据关键字获取费用单 * 根据关键字获取费用单
*
* @return * @return
*/ */
List<CostDomain> selectByKey(@Param("searchKey") String searchKey, @Param("costStatus") Integer costStatus); List<CostDomain> selectByKey(@Param("searchKey") String searchKey, @Param("costStatus") Integer costStatus);
...@@ -65,7 +71,7 @@ public interface CostDao { ...@@ -65,7 +71,7 @@ public interface CostDao {
List<CostDomain> selectByCostForm(Integer costForm); List<CostDomain> selectByCostForm(Integer costForm);
List<CostDomain> selectByCostFormAndStatus(@Param("costForm")Integer costForm,@Param("costStatus")Integer costStatus); List<CostDomain> selectByCostFormAndStatus(@Param("costForm") Integer costForm, @Param("costStatus") Integer costStatus);
List<CostDomain> selectBySupCostNo(String supCostNo); List<CostDomain> selectBySupCostNo(String supCostNo);
...@@ -79,10 +85,11 @@ public interface CostDao { ...@@ -79,10 +85,11 @@ public interface CostDao {
CostDomain selectLastCost(); CostDomain selectLastCost();
List<CostDomain> selectLinkLendCost(@Param("createuserid")Integer createuserid); List<CostDomain> selectLinkLendCost(@Param("createuserid") Integer createuserid);
/** /**
* 查询管理成本费用列表,付款单+借还单 * 查询管理成本费用列表,付款单+借还单
*
* @param startDate * @param startDate
* @param endDate * @param endDate
* @param feeSuperType * @param feeSuperType
...@@ -96,16 +103,17 @@ public interface CostDao { ...@@ -96,16 +103,17 @@ public interface CostDao {
*/ */
List<ManageCostDto> selectManageCost(@Param("startDate") Date startDate, @Param("endDate") Date endDate, @Param("feeSuperType") String feeSuperType, List<ManageCostDto> selectManageCost(@Param("startDate") Date startDate, @Param("endDate") Date endDate, @Param("feeSuperType") String feeSuperType,
@Param("feeSubType") String feeSubType, @Param("companyValueList") List<Integer> companyValueList, @Param("feeSubType") String feeSubType, @Param("companyValueList") List<Integer> companyValueList,
@Param("companyName")String companyName, @Param("departmentName") String departmentName, @Param("companyName") String companyName, @Param("departmentName") String departmentName,
@Param("createUserId") Integer createUserId, @Param("payUserId") Integer payUserId); @Param("createUserId") Integer createUserId, @Param("payUserId") Integer payUserId);
List<ManageCostDto> getLogisticsCostList(@Param("startDate") Date startDate, @Param("endDate") Date endDate, @Param("feeSuperType") String feeSuperType, List<ManageCostDto> getLogisticsCostList(@Param("startDate") Date startDate, @Param("endDate") Date endDate, @Param("feeSuperType") String feeSuperType,
@Param("feeSubType") String feeSubType, @Param("companyValueList") List<Integer> companyValueList, @Param("feeSubType") String feeSubType, @Param("companyValueList") List<Integer> companyValueList,
@Param("companyName")String companyName, @Param("departmentName") String departmentName, @Param("companyName") String companyName, @Param("departmentName") String departmentName,
@Param("createUserId") Integer createUserId, @Param("payUserId") Integer payUserId); @Param("createUserId") Integer createUserId, @Param("payUserId") Integer payUserId);
/** /**
* 查询资产负债表相关费用单 * 查询资产负债表相关费用单
*
* @param startDate * @param startDate
* @param endDate * @param endDate
* @return * @return
...@@ -114,6 +122,7 @@ public interface CostDao { ...@@ -114,6 +122,7 @@ public interface CostDao {
/** /**
* 查询原来传输到数据中心时为待支付状态 变成 已支付状态后的费用单 * 查询原来传输到数据中心时为待支付状态 变成 已支付状态后的费用单
*
* @param costNoList * @param costNoList
* @return * @return
*/ */
...@@ -124,6 +133,7 @@ public interface CostDao { ...@@ -124,6 +133,7 @@ public interface CostDao {
List<CostDto> getCostByRejectStatus(); List<CostDto> getCostByRejectStatus();
List<String> listCostNo(); List<String> listCostNo();
List<String> listCostNoAll(CostExportVo costExportVo); List<String> listCostNoAll(CostExportVo costExportVo);
Integer updateCashierAnnex(@Param("costNo") String costNo, @Param("filePath") String filePath, @Param("downloadUrl") String downloadUrl); Integer updateCashierAnnex(@Param("costNo") String costNo, @Param("filePath") String filePath, @Param("downloadUrl") String downloadUrl);
......
...@@ -71,6 +71,13 @@ public class CostDto { ...@@ -71,6 +71,13 @@ public class CostDto {
private String cashierFilePath; private String cashierFilePath;
private String cashierDownloadPath; private String cashierDownloadPath;
//费用来源 1-默认 2-WMS 3-调拨系统
private String sourceFrom;
//项目
private String projectType;
//客户编号
private String customerNum;
public String getDic() { public String getDic() {
return dic; return dic;
} }
...@@ -625,4 +632,28 @@ public class CostDto { ...@@ -625,4 +632,28 @@ public class CostDto {
", rejectTime=" + rejectTime + ", rejectTime=" + rejectTime +
'}'; '}';
} }
public String getCustomerNum() {
return customerNum;
}
public void setCustomerNum(String customerNum) {
this.customerNum = customerNum;
}
public String getProjectType() {
return projectType;
}
public void setProjectType(String projectType) {
this.projectType = projectType;
}
public String getSourceFrom() {
return sourceFrom;
}
public void setSourceFrom(String sourceFrom) {
this.sourceFrom = sourceFrom;
}
} }
...@@ -20,7 +20,7 @@ public interface CostService { ...@@ -20,7 +20,7 @@ public interface CostService {
* 获取所有费用单 * 获取所有费用单
* @return * @return
*/ */
Map<String, Object> getAllCost(Integer pageNum,Integer pageSize, Integer userId); Map<String, Object> getAllCost(Integer pageNum,Integer pageSize, Integer userId,String projectTypes);
/** /**
* 根据 costNo 获取 cost * 根据 costNo 获取 cost
......
...@@ -6,16 +6,13 @@ import com.blt.other.other_database.model.CostDomain; ...@@ -6,16 +6,13 @@ import com.blt.other.other_database.model.CostDomain;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.text.NumberFormat; import java.text.NumberFormat;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Random;
/** /**
* 费用工具类 * 费用工具类
*/ */
public class CostUtils { public class CostUtils {
public static String getIdNum( CostService costService){ public static String getIdNum(CostService costService) {
NumberFormat nf = NumberFormat.getInstance(); NumberFormat nf = NumberFormat.getInstance();
nf.setGroupingUsed(false); nf.setGroupingUsed(false);
nf.setMaximumIntegerDigits(6); nf.setMaximumIntegerDigits(6);
...@@ -23,25 +20,25 @@ public class CostUtils { ...@@ -23,25 +20,25 @@ public class CostUtils {
String result = ""; String result = "";
CostDomain lastCost = costService.getLastCost(); CostDomain lastCost = costService.getLastCost();
if (null == lastCost){ if (null == lastCost) {
result = nf.format(0); result = nf.format(0);
}else { } else {
String costNo = lastCost.getCostNo(); String costNo = lastCost.getCostNo();
if (costNo != null && costNo.contains("-")){ if (costNo != null && costNo.contains("-")) {
costNo = costNo.split("-")[0]; costNo = costNo.split("-")[0];
} }
if (null != costNo && (costNo.startsWith("F"))) { if (null != costNo && (costNo.startsWith("F"))) {
String[] os = costNo.split("F"); String[] os = costNo.split("F");
result = nf.format(Integer.parseInt(os[1]) + 1); result = nf.format(Integer.parseInt(os[1]) + 1);
} else if (null != costNo && costNo.startsWith("SF")){ } else if (null != costNo && costNo.startsWith("SF")) {
String[] os = costNo.split("F"); String[] os = costNo.split("F");
result = nf.format(Integer.parseInt(os[1]) + 1); result = nf.format(Integer.parseInt(os[1]) + 1);
} }
if (null == costNo){ if (null == costNo) {
return "F000000"; return "F000000";
} }
} }
return "F"+result; return "F" + result;
} }
/** /**
...@@ -57,10 +54,11 @@ public class CostUtils { ...@@ -57,10 +54,11 @@ public class CostUtils {
/** /**
* 生成 CostDomain 实例 * 生成 CostDomain 实例
*
* @param request * @param request
* @return * @return
*/ */
public static CostDomain createCostDomain(HttpServletRequest request,String costNo){ public static CostDomain createCostDomain(HttpServletRequest request, String costNo) {
String companyNo = request.getParameter("companyNo"); String companyNo = request.getParameter("companyNo");
String kindNo = request.getParameter("kindNo"); String kindNo = request.getParameter("kindNo");
String amountRequest = request.getParameter("amount"); String amountRequest = request.getParameter("amount");
...@@ -72,12 +70,12 @@ public class CostUtils { ...@@ -72,12 +70,12 @@ public class CostUtils {
String createUsercode = request.getParameter("createUsercode"); String createUsercode = request.getParameter("createUsercode");
Integer subLogisticsSupplierId = null;//二级物流供应商ID,非物流费用单为NULL Integer subLogisticsSupplierId = null;//二级物流供应商ID,非物流费用单为NULL
String subLogisticsStr = request.getParameter("subLogisticsSupplierId"); String subLogisticsStr = request.getParameter("subLogisticsSupplierId");
if (subLogisticsStr != null && !"".equals(subLogisticsStr) && !"null".equals(subLogisticsStr)){ if (subLogisticsStr != null && !"".equals(subLogisticsStr) && !"null".equals(subLogisticsStr)) {
subLogisticsSupplierId = Integer.valueOf(subLogisticsStr); subLogisticsSupplierId = Integer.valueOf(subLogisticsStr);
} }
Integer logisticsSupplierId = null;//一级物流供应商ID,非物流费用单为NULL Integer logisticsSupplierId = null;//一级物流供应商ID,非物流费用单为NULL
String logisticsStr = request.getParameter("logisticsSupplierId"); String logisticsStr = request.getParameter("logisticsSupplierId");
if (logisticsStr != null && !"".equals(logisticsStr) && !"null".equals(logisticsStr)){ if (logisticsStr != null && !"".equals(logisticsStr) && !"null".equals(logisticsStr)) {
logisticsSupplierId = Integer.valueOf(logisticsStr); logisticsSupplierId = Integer.valueOf(logisticsStr);
} }
String bankName = request.getParameter("bankName"); String bankName = request.getParameter("bankName");
...@@ -90,21 +88,23 @@ public class CostUtils { ...@@ -90,21 +88,23 @@ public class CostUtils {
String dic = request.getParameter("dic"); String dic = request.getParameter("dic");
String detailKey = request.getParameter("detailKey"); String detailKey = request.getParameter("detailKey");
Integer isLend = null; Integer isLend = null;
if (null != isLendStr && !"null".equals(isLendStr)){ if (null != isLendStr && !"null".equals(isLendStr)) {
isLend = Integer.parseInt(isLendStr); isLend = Integer.parseInt(isLendStr);
} }
String costFormStr = request.getParameter("costForm"); String costFormStr = request.getParameter("costForm");
Integer costForm = null; Integer costForm = null;
Integer isTax = 0; Integer isTax = 0;
if (null != costFormStr && !"null".equals(costFormStr)){ if (null != costFormStr && !"null".equals(costFormStr)) {
costForm = Integer.parseInt(costFormStr); costForm = Integer.parseInt(costFormStr);
if (1 == costForm){ if (1 == costForm) {
String isTaxStr = request.getParameter("isTax"); String isTaxStr = request.getParameter("isTax");
if (null != isTaxStr){ if (null != isTaxStr) {
isTax = Integer.parseInt(isTaxStr); isTax = Integer.parseInt(isTaxStr);
} }
} }
} }
String projectType = request.getParameter("projectType");
String customerNum = request.getParameter("customerNum");
// 封装 CostDomain // 封装 CostDomain
CostDomain costDomain = new CostDomain(); CostDomain costDomain = new CostDomain();
...@@ -127,13 +127,16 @@ public class CostUtils { ...@@ -127,13 +127,16 @@ public class CostUtils {
costDomain.setIsLend(isLend); costDomain.setIsLend(isLend);
costDomain.setDic(dic); costDomain.setDic(dic);
costDomain.setIsTax(isTax); costDomain.setIsTax(isTax);
if (null != costForm && 3 == costForm){ costDomain.setProjectType(projectType);
if (1 == isLend){ costDomain.setCustomerNum(customerNum);
if (null != costForm && 3 == costForm) {
if (1 == isLend) {
// 借支 // 借支
costDomain.setTypeNo(null); costDomain.setTypeNo(null);
costDomain.setKindNo(kindNo); costDomain.setKindNo(kindNo);
String hadPay = request.getParameter("hadPay"); String hadPay = request.getParameter("hadPay");
if (null != hadPay && !"null".equals(hadPay)){ if (null != hadPay && !"null".equals(hadPay)) {
costDomain.setHadPay(new BigDecimal(hadPay)); costDomain.setHadPay(new BigDecimal(hadPay));
} }
String lendStatus = request.getParameter("lendStatus"); String lendStatus = request.getParameter("lendStatus");
...@@ -152,7 +155,7 @@ public class CostUtils { ...@@ -152,7 +155,7 @@ public class CostUtils {
if (null != lendBalance && !"null".equals(lendBalance)) { if (null != lendBalance && !"null".equals(lendBalance)) {
costDomain.setLendBalance(new BigDecimal(lendBalance)); costDomain.setLendBalance(new BigDecimal(lendBalance));
} }
}else if (2 == isLend){ } else if (2 == isLend) {
// 借还 // 借还
String supCostNo = request.getParameter("supCostNo"); String supCostNo = request.getParameter("supCostNo");
costDomain.setSupCostNo(supCostNo); costDomain.setSupCostNo(supCostNo);
......
...@@ -20,7 +20,7 @@ public class CostDomain { ...@@ -20,7 +20,7 @@ public class CostDomain {
private String createUsercode; // 创建人编号 private String createUsercode; // 创建人编号
private String createUsername; // 创建人名称 private String createUsername; // 创建人名称
private String costRemark; // 费用单备注 private String costRemark; // 费用单备注
@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone="GMT+8") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date createTime; // 创建时间 private Date createTime; // 创建时间
private String sonCostNo; // 关联子单 private String sonCostNo; // 关联子单
private String supCostNo; // 关联父单 private String supCostNo; // 关联父单
...@@ -53,12 +53,12 @@ public class CostDomain { ...@@ -53,12 +53,12 @@ public class CostDomain {
private Integer isTax; // 0 不抵扣个税 1 抵扣个税 private Integer isTax; // 0 不抵扣个税 1 抵扣个税
private String detailKey; // 出纳系统 detailKey private String detailKey; // 出纳系统 detailKey
private Integer payUserId; // 支付者用户ID private Integer payUserId; // 支付者用户ID
@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone="GMT+8") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date payTime; // 支付时间 private Date payTime; // 支付时间
private BigDecimal toRmbRate; // 转人民币汇率 private BigDecimal toRmbRate; // 转人民币汇率
private BigDecimal amountRmb; // 费用单人民币总金额 private BigDecimal amountRmb; // 费用单人民币总金额
private Integer companyValue; // 公司主体value private Integer companyValue; // 公司主体value
@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone="GMT+8") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date auditTime; // 财务审核时间 private Date auditTime; // 财务审核时间
private Integer hasInvoice; //发票状态 private Integer hasInvoice; //发票状态
private Integer rejectType; //驳回类型 private Integer rejectType; //驳回类型
...@@ -67,6 +67,10 @@ public class CostDomain { ...@@ -67,6 +67,10 @@ public class CostDomain {
private String cashierDownloadPath; private String cashierDownloadPath;
//费用来源 1-默认 2-WMS 3-调拨系统 //费用来源 1-默认 2-WMS 3-调拨系统
private String sourceFrom; private String sourceFrom;
//项目
private String projectType;
//客户编号
private String customerNum;
public String getDic() { public String getDic() {
return dic; return dic;
...@@ -584,5 +588,21 @@ public class CostDomain { ...@@ -584,5 +588,21 @@ public class CostDomain {
public void setSourceFrom(String sourceFrom) { public void setSourceFrom(String sourceFrom) {
this.sourceFrom = sourceFrom; this.sourceFrom = sourceFrom;
} }
public String getProjectType() {
return projectType;
}
public void setProjectType(String projectType) {
this.projectType = projectType;
}
public String getCustomerNum() {
return customerNum;
}
public void setCustomerNum(String customerNum) {
this.customerNum = customerNum;
}
} }
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
reject_reason, bank_company, cost_plan_no, dic, pay_counteract, pay_lend_balance, reject_reason, bank_company, cost_plan_no, dic, pay_counteract, pay_lend_balance,
pay_plan_amount, pay_dic, pay_cur, is_tax, pay_plan_amount, pay_dic, pay_cur, is_tax,
detail_key, pay_user_id, pay_time, amount_rmb, to_rmb_rate, company_value, audit_time, detail_key, pay_user_id, pay_time, amount_rmb, to_rmb_rate, company_value, audit_time,
source_from) source_from, project_type, customer_num)
VALUE VALUE
( (
#{costNo}, #{companyNo}, #{companyName}, #{typeNo}, #{typeName}, #{subjectCode}, #{kindNo}, #{kindName}, #{costNo}, #{companyNo}, #{companyName}, #{typeNo}, #{typeName}, #{subjectCode}, #{kindNo}, #{kindName},
...@@ -24,7 +24,8 @@ ...@@ -24,7 +24,8 @@
#{lendStatus}, #{compensate}, #{counteract}, #{lendBalance}, #{lendStatus}, #{compensate}, #{counteract}, #{lendBalance},
#{rejectReason}, #{bankCompany}, #{costPlanNo}, #{dic}, #{payCounteract}, #{payLendBalance}, #{rejectReason}, #{bankCompany}, #{costPlanNo}, #{dic}, #{payCounteract}, #{payLendBalance},
#{payPlanAmount}, #{payDic}, #{payCur}, #{isTax}, #{payPlanAmount}, #{payDic}, #{payCur}, #{isTax},
#{detailKey}, #{payUserId}, #{payTime}, #{amountRmb}, #{toRmbRate}, #{companyValue}, #{auditTime}, #{sourceFrom} #{detailKey}, #{payUserId}, #{payTime}, #{amountRmb}, #{toRmbRate}, #{companyValue}, #{auditTime},
#{sourceFrom}, #{projectType}, #{customerNum}
) )
</insert> </insert>
...@@ -36,6 +37,12 @@ ...@@ -36,6 +37,12 @@
<if test="userId != null"> <if test="userId != null">
where create_userid = #{userId} where create_userid = #{userId}
</if> </if>
<if test="projectTypeList != null and projectTypeList.size() > 0">
AND project_type in
<foreach collection="projectTypeList" item="projectType" index="index" open="(" close=")" separator=",">
#{projectType}
</foreach>
</if>
ORDER BY ORDER BY
id DESC id DESC
</select> </select>
...@@ -105,7 +112,9 @@ ...@@ -105,7 +112,9 @@
<if test="hasInvoice != null">has_invoice = #{hasInvoice},</if> <if test="hasInvoice != null">has_invoice = #{hasInvoice},</if>
<if test="rejectType != null">reject_type = #{rejectType},</if> <if test="rejectType != null">reject_type = #{rejectType},</if>
<if test="rejectTime != null">reject_time = #{rejectTime},</if> <if test="rejectTime != null">reject_time = #{rejectTime},</if>
<if test="sourceFrom != null">source_from = #{sourceFrom}</if> <if test="sourceFrom != null">source_from = #{sourceFrom},</if>
<if test="projectType != null">project_type = #{projectType},</if>
<if test="customerNum != null">customer_num = #{customerNum}</if>
</set> </set>
WHERE WHERE
cost_no = #{costNo} cost_no = #{costNo}
...@@ -165,8 +174,10 @@ ...@@ -165,8 +174,10 @@
<if test=" companyValue!=null">company_value=#{companyValue},</if> <if test=" companyValue!=null">company_value=#{companyValue},</if>
<if test=" auditTime!=null">audit_time=#{auditTime},</if> <if test=" auditTime!=null">audit_time=#{auditTime},</if>
<if test="hasInvoice != null">has_invoice = #{hasInvoice},</if> <if test="hasInvoice != null">has_invoice = #{hasInvoice},</if>
<if test="rejectType != null">reject_type = #{rejectType}</if> <if test="rejectType != null">reject_type = #{rejectType},</if>
<if test="sourceFrom != null">source_from = #{sourceFrom}</if> <if test="sourceFrom != null">source_from = #{sourceFrom},</if>
<if test="projectType != null">project_type = #{projectType},</if>
<if test="customerNum != null">customer_num = #{customerNum}</if>
</set> </set>
WHERE WHERE
id = #{id} id = #{id}
......
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