给出入库明细接口增加税率和税额字段

This commit is contained in:
季圣华
2022-08-25 22:24:35 +08:00
parent 57de1c4d93
commit a10fabb7ef
5 changed files with 47 additions and 12 deletions

View File

@@ -126,9 +126,9 @@ public class DepotHeadController {
String [] organArray = depotHeadService.getOrganArray(subType, ""); String [] organArray = depotHeadService.getOrganArray(subType, "");
beginTime = Tools.parseDayToTime(beginTime, BusinessConstants.DAY_FIRST_TIME); beginTime = Tools.parseDayToTime(beginTime, BusinessConstants.DAY_FIRST_TIME);
endTime = Tools.parseDayToTime(endTime,BusinessConstants.DAY_LAST_TIME); endTime = Tools.parseDayToTime(endTime,BusinessConstants.DAY_LAST_TIME);
List<DepotHeadVo4InDetail> list = depotHeadService.findByAll(beginTime, endTime, type, creatorArray, organArray, List<DepotHeadVo4InDetail> list = depotHeadService.findInDetail(beginTime, endTime, type, creatorArray, organArray,
StringUtil.toNull(materialParam), depotList, oId, StringUtil.toNull(number), remark, (currentPage-1)*pageSize, pageSize); StringUtil.toNull(materialParam), depotList, oId, StringUtil.toNull(number), remark, (currentPage-1)*pageSize, pageSize);
int total = depotHeadService.findByAllCount(beginTime, endTime, type, creatorArray, organArray, int total = depotHeadService.findInDetailCount(beginTime, endTime, type, creatorArray, organArray,
StringUtil.toNull(materialParam), depotList, oId, StringUtil.toNull(number), remark); StringUtil.toNull(materialParam), depotList, oId, StringUtil.toNull(number), remark);
map.put("total", total); map.put("total", total);
//存放数据json数组 //存放数据json数组

View File

@@ -61,7 +61,7 @@ public interface DepotHeadMapperEx {
String findMaterialsListByHeaderId( String findMaterialsListByHeaderId(
@Param("id") Long id); @Param("id") Long id);
List<DepotHeadVo4InDetail> findByAll( List<DepotHeadVo4InDetail> findInDetail(
@Param("beginTime") String beginTime, @Param("beginTime") String beginTime,
@Param("endTime") String endTime, @Param("endTime") String endTime,
@Param("type") String type, @Param("type") String type,
@@ -75,7 +75,7 @@ public interface DepotHeadMapperEx {
@Param("offset") Integer offset, @Param("offset") Integer offset,
@Param("rows") Integer rows); @Param("rows") Integer rows);
int findByAllCount( int findInDetailCount(
@Param("beginTime") String beginTime, @Param("beginTime") String beginTime,
@Param("endTime") String endTime, @Param("endTime") String endTime,
@Param("type") String type, @Param("type") String type,

View File

@@ -26,6 +26,12 @@ public class DepotHeadVo4InDetail {
private BigDecimal AllPrice; private BigDecimal AllPrice;
private BigDecimal taxRate;
private BigDecimal taxMoney;
private BigDecimal taxLastMoney;
private String SName; private String SName;
private String DName; private String DName;
@@ -116,6 +122,30 @@ public class DepotHeadVo4InDetail {
AllPrice = allPrice; AllPrice = allPrice;
} }
public BigDecimal getTaxRate() {
return taxRate;
}
public void setTaxRate(BigDecimal taxRate) {
this.taxRate = taxRate;
}
public BigDecimal getTaxMoney() {
return taxMoney;
}
public void setTaxMoney(BigDecimal taxMoney) {
this.taxMoney = taxMoney;
}
public BigDecimal getTaxLastMoney() {
return taxLastMoney;
}
public void setTaxLastMoney(BigDecimal taxLastMoney) {
this.taxLastMoney = taxLastMoney;
}
public String getSName() { public String getSName() {
return SName; return SName;
} }

View File

@@ -486,24 +486,24 @@ public class DepotHeadService {
return result; return result;
} }
public List<DepotHeadVo4InDetail> findByAll(String beginTime, String endTime, String type, String [] creatorArray, public List<DepotHeadVo4InDetail> findInDetail(String beginTime, String endTime, String type, String [] creatorArray,
String [] organArray, String materialParam, List<Long> depotList, Integer oId, String number, String [] organArray, String materialParam, List<Long> depotList, Integer oId, String number,
String remark, Integer offset, Integer rows) throws Exception{ String remark, Integer offset, Integer rows) throws Exception{
List<DepotHeadVo4InDetail> list = null; List<DepotHeadVo4InDetail> list = null;
try{ try{
list =depotHeadMapperEx.findByAll(beginTime, endTime, type, creatorArray, organArray, materialParam, depotList, oId, number, remark, offset, rows); list =depotHeadMapperEx.findInDetail(beginTime, endTime, type, creatorArray, organArray, materialParam, depotList, oId, number, remark, offset, rows);
}catch(Exception e){ }catch(Exception e){
JshException.readFail(logger, e); JshException.readFail(logger, e);
} }
return list; return list;
} }
public int findByAllCount(String beginTime, String endTime, String type, String [] creatorArray, public int findInDetailCount(String beginTime, String endTime, String type, String [] creatorArray,
String [] organArray, String materialParam, List<Long> depotList, Integer oId, String number, String [] organArray, String materialParam, List<Long> depotList, Integer oId, String number,
String remark) throws Exception{ String remark) throws Exception{
int result = 0; int result = 0;
try{ try{
result =depotHeadMapperEx.findByAllCount(beginTime, endTime, type, creatorArray, organArray, materialParam, depotList, oId, number, remark); result =depotHeadMapperEx.findInDetailCount(beginTime, endTime, type, creatorArray, organArray, materialParam, depotList, oId, number, remark);
}catch(Exception e){ }catch(Exception e){
JshException.readFail(logger, e); JshException.readFail(logger, e);
} }

View File

@@ -21,6 +21,9 @@
<result column="unit_price" jdbcType="DECIMAL" property="UnitPrice" /> <result column="unit_price" jdbcType="DECIMAL" property="UnitPrice" />
<result column="oper_number" jdbcType="DECIMAL" property="OperNumber" /> <result column="oper_number" jdbcType="DECIMAL" property="OperNumber" />
<result column="all_price" jdbcType="DECIMAL" property="AllPrice" /> <result column="all_price" jdbcType="DECIMAL" property="AllPrice" />
<result column="tax_rate" jdbcType="DECIMAL" property="taxRate" />
<result column="tax_money" jdbcType="DECIMAL" property="taxMoney" />
<result column="tax_last_money" jdbcType="DECIMAL" property="taxLastMoney" />
<result column="SName" jdbcType="VARCHAR" property="SName" /> <result column="SName" jdbcType="VARCHAR" property="SName" />
<result column="DName" jdbcType="VARCHAR" property="DName" /> <result column="DName" jdbcType="VARCHAR" property="DName" />
<result column="OperTime" jdbcType="VARCHAR" property="OperTime" /> <result column="OperTime" jdbcType="VARCHAR" property="OperTime" />
@@ -236,9 +239,11 @@
and ifnull(jsh_depot_item.delete_flag,'0') !='1' and ifnull(jsh_depot_item.delete_flag,'0') !='1'
</select> </select>
<select id="findByAll" parameterType="com.jsh.erp.datasource.entities.DepotItemExample" resultMap="ResultWithInfoExMap"> <select id="findInDetail" parameterType="com.jsh.erp.datasource.entities.DepotItemExample" resultMap="ResultWithInfoExMap">
select dh.number,me.bar_code, m.`name` MName,m.model,m.standard,di.unit_price,di.material_unit as mUnit,di.oper_number,di.all_price,s.supplier SName,d.dName DName, select dh.number,me.bar_code, m.`name` MName,m.model,m.standard,di.unit_price,di.material_unit as mUnit,
date_format(dh.oper_time, '%Y-%m-%d') OperTime, concat(dh.sub_type,dh.type) as NewType, concat_ws(' ',dh.remark,di.remark) as newRemark di.oper_number,di.all_price, ifnull(di.tax_rate,0) tax_rate, ifnull(di.tax_money,0) tax_money, ifnull(di.tax_last_money,0) tax_last_money,
s.supplier SName,d.dName DName, date_format(dh.oper_time, '%Y-%m-%d') OperTime, concat(dh.sub_type,dh.type) as NewType,
concat_ws(' ',dh.remark,di.remark) as newRemark
from jsh_depot_head dh from jsh_depot_head dh
left join jsh_depot_item di on di.header_id=dh.id and ifnull(di.delete_flag,'0') !='1' left join jsh_depot_item di on di.header_id=dh.id and ifnull(di.delete_flag,'0') !='1'
left join jsh_material m on m.id=di.material_id and ifnull(m.delete_flag,'0') !='1' left join jsh_material m on m.id=di.material_id and ifnull(m.delete_flag,'0') !='1'
@@ -292,7 +297,7 @@
</if> </if>
</select> </select>
<select id="findByAllCount" resultType="java.lang.Integer"> <select id="findInDetailCount" resultType="java.lang.Integer">
select count(1) select count(1)
from jsh_depot_head dh from jsh_depot_head dh
left join jsh_depot_item di on di.header_id=dh.id and ifnull(di.delete_flag,'0') !='1' left join jsh_depot_item di on di.header_id=dh.id and ifnull(di.delete_flag,'0') !='1'