计费模块重构,可以在线配置SQl,更灵活面对不同计费方式
parent
d88f5d0900
commit
376aaecbe2
|
@ -1,3 +0,0 @@
|
|||
ALTER TABLE `wms`.`wm_in_qm_i`
|
||||
ADD COLUMN `base_in_goodscount` VARCHAR(45) NULL AFTER `IM_CUS_CODE`,
|
||||
ADD COLUMN `base_out_goodscount` VARCHAR(45) NULL AFTER `base_in_goodscount`;
|
File diff suppressed because one or more lines are too long
10077
database/wms20220613.sql
10077
database/wms20220613.sql
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -51,6 +51,12 @@ public class BaCostConfEntity implements java.io.Serializable {
|
|||
/**费用名称*/
|
||||
@Excel(name="费用名称")
|
||||
private java.lang.String costCode;
|
||||
@Excel(name="免费天数")
|
||||
private java.lang.String freeDay;
|
||||
// @Excel(name="免费天数2")
|
||||
private java.lang.String freeDay2;
|
||||
@Excel(name="数据SQL")
|
||||
private java.lang.String dataSql;
|
||||
/**价格RMB*/
|
||||
@Excel(name="价格RMB")
|
||||
private java.lang.String costJg;
|
||||
|
@ -310,4 +316,31 @@ public class BaCostConfEntity implements java.io.Serializable {
|
|||
public void setCostHs(java.lang.String costHs){
|
||||
this.costHs = costHs;
|
||||
}
|
||||
|
||||
@Column(name ="free_day",nullable=true,length=36)
|
||||
public String getFreeDay() {
|
||||
return freeDay;
|
||||
}
|
||||
|
||||
public void setFreeDay(String freeDay) {
|
||||
this.freeDay = freeDay;
|
||||
}
|
||||
|
||||
@Column(name ="free_day2",nullable=true,length=36)
|
||||
public String getFreeDay2() {
|
||||
return freeDay2;
|
||||
}
|
||||
|
||||
public void setFreeDay2(String freeDay2) {
|
||||
this.freeDay2 = freeDay2;
|
||||
}
|
||||
|
||||
@Column(name ="data_sql",nullable=true,length=36)
|
||||
public String getDataSql() {
|
||||
return dataSql;
|
||||
}
|
||||
|
||||
public void setDataSql(String dataSql) {
|
||||
this.dataSql = dataSql;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -284,6 +284,9 @@ public class WmCusCostHController extends BaseController {
|
|||
t.setCostZk(baCostConfEntity.getCostZk());
|
||||
t.setCostBhs(baCostConfEntity.getCostBhs());
|
||||
t.setCostHs(baCostConfEntity.getCostHs());
|
||||
t.setFreeDay(baCostConfEntity.getFreeDay());
|
||||
t.setFreeDay2(baCostConfEntity.getFreeDay2());
|
||||
t.setDataSql(baCostConfEntity.getDataSql());
|
||||
wmCusCostIEntityList.add(t);
|
||||
}
|
||||
}catch(Exception e){
|
||||
|
|
|
@ -53,8 +53,10 @@ public class WmCusCostIEntity implements java.io.Serializable {
|
|||
/**费用名称*/
|
||||
@Excel(name="免费天数")
|
||||
private java.lang.String freeDay;
|
||||
@Excel(name="免费天数2")
|
||||
// @Excel(name="免费天数2")
|
||||
private java.lang.String freeDay2;
|
||||
@Excel(name="数据SQL")
|
||||
private java.lang.String dataSql;
|
||||
/**价格RMB*/
|
||||
@Excel(name="价格RMB")
|
||||
private java.lang.String costJg;
|
||||
|
@ -381,4 +383,13 @@ public class WmCusCostIEntity implements java.io.Serializable {
|
|||
public void setFreeDay2(String freeDay2) {
|
||||
this.freeDay2 = freeDay2;
|
||||
}
|
||||
|
||||
@Column(name ="data_sql",nullable=true,length=36)
|
||||
public String getDataSql() {
|
||||
return dataSql;
|
||||
}
|
||||
|
||||
public void setDataSql(String dataSql) {
|
||||
this.dataSql = dataSql;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -63,6 +63,40 @@ public class CostTask {
|
|||
org.jeecgframework.core.util.LogUtil.info("总耗时" + times + "毫秒");
|
||||
}
|
||||
|
||||
public void costcountv2(String datestr, String chongsuan, WmDayCostConfEntity t){
|
||||
String tsql = "select COST_SF from wm_day_cost_conf where to_days(cost_date) = to_days(?)";
|
||||
if (chongsuan.equals("N")) {//非重算
|
||||
List<Map<String, Object>> resultconf = systemService.findForJdbc(tsql, datestr);
|
||||
if (resultconf.size() > 0) {
|
||||
return;
|
||||
} else {
|
||||
Date costdate = DateUtils.str2Date(datestr, DateUtils.date_sdf);
|
||||
t.setCostDate(costdate);
|
||||
t.setCostSf("Y");
|
||||
t.setCreateBy("system");
|
||||
t.setCreateDate(costdate);
|
||||
systemService.save(t);
|
||||
}
|
||||
}
|
||||
tsql = "call update_wm_his_stock('" + datestr + "')";
|
||||
try {
|
||||
systemService.executeSql(tsql);
|
||||
} catch (Exception e) {
|
||||
// TODO: handle exception
|
||||
}
|
||||
org.jeecgframework.core.util.LogUtil
|
||||
.info("===================1库存更新成功===================");
|
||||
|
||||
//先删除
|
||||
tsql = "delete from wm_day_cost where cost_sta ='已生成' and to_days(cost_data) = to_days(?)";
|
||||
|
||||
systemService.executeSql(tsql, t.getCostDate());
|
||||
org.jeecgframework.core.util.LogUtil
|
||||
.info("===================V2数据删除成功===================");
|
||||
|
||||
|
||||
}
|
||||
|
||||
public void costcount(String datestr, String chongsuan, WmDayCostConfEntity t) {
|
||||
// WmDayCostConfEntity t = new WmDayCostConfEntity();
|
||||
String tsql = "select COST_SF from wm_day_cost_conf where to_days(cost_date) = to_days(?)";
|
||||
|
|
|
@ -62,6 +62,42 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row show-grid">
|
||||
<div class="col-xs-3 text-center">
|
||||
<b>免费天数:</b>
|
||||
</div>
|
||||
<div class="col-xs-3">
|
||||
<input id="freeDay" name="freeDay" type="text" class="form-control"
|
||||
ignore="ignore"
|
||||
/>
|
||||
<span class="Validform_checktip" style="float:left;height:0px;"></span>
|
||||
<label class="Validform_label" style="display: none">免费天数</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row show-grid">
|
||||
<div class="col-xs-3 text-center">
|
||||
<b>免费天数2:</b>
|
||||
</div>
|
||||
<div class="col-xs-3">
|
||||
<input id="freeDay2" name="freeDay2" type="text" class="form-control"
|
||||
ignore="ignore"
|
||||
/>
|
||||
<span class="Validform_checktip" style="float:left;height:0px;"></span>
|
||||
<label class="Validform_label" style="display: none">免费天数2</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row show-grid">
|
||||
<div class="col-xs-3 text-center">
|
||||
<b>数据SQL:</b>
|
||||
</div>
|
||||
<div class="col-xs-3">
|
||||
<input id="dataSql" name="dataSql" type="text" class="form-control"
|
||||
ignore="ignore"
|
||||
/>
|
||||
<span class="Validform_checktip" style="float:left;height:0px;"></span>
|
||||
<label class="Validform_label" style="display: none">数据SQL</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row show-grid">
|
||||
<div class="col-xs-3 text-center">
|
||||
|
|
|
@ -63,6 +63,44 @@
|
|||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="row show-grid">
|
||||
<div class="col-xs-3 text-center">
|
||||
<b>免费天数:</b>
|
||||
</div>
|
||||
<div class="col-xs-3">
|
||||
<input id="freeDay" name="freeDay" type="text" class="form-control"
|
||||
ignore="ignore"
|
||||
value='${baCostConfPage.freeDay}' />
|
||||
<span class="Validform_checktip" style="float:left;height:0px;"></span>
|
||||
<label class="Validform_label" style="display: none">免费天数</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row show-grid">
|
||||
<div class="col-xs-3 text-center">
|
||||
<b>免费天数2:</b>
|
||||
</div>
|
||||
<div class="col-xs-3">
|
||||
<input id="freeDay2" name="freeDay2" type="text" class="form-control"
|
||||
ignore="ignore"
|
||||
value='${baCostConfPage.freeDay2}' />
|
||||
<span class="Validform_checktip" style="float:left;height:0px;"></span>
|
||||
<label class="Validform_label" style="display: none">免费天数2</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row show-grid">
|
||||
<div class="col-xs-3 text-center">
|
||||
<b>数据SQL:</b>
|
||||
</div>
|
||||
<div class="col-xs-3">
|
||||
<input id="dataSql" name="dataSql" type="text" class="form-control"
|
||||
ignore="ignore"
|
||||
value='${baCostConfPage.dataSql}' />
|
||||
<span class="Validform_checktip" style="float:left;height:0px;"></span>
|
||||
<label class="Validform_label" style="display: none">数据SQL</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row show-grid">
|
||||
<div class="col-xs-3 text-center">
|
||||
<b>价格RMB:</b>
|
||||
|
|
|
@ -14,6 +14,9 @@
|
|||
<t:dgCol title="所属部门" field="sysOrgCode" hidden="true" queryMode="single" width="120"></t:dgCol>
|
||||
<t:dgCol title="所属公司" field="sysCompanyCode" hidden="true" queryMode="single" width="120"></t:dgCol>
|
||||
<t:dgCol title="费用名称" field="costCode" query="true" queryMode="single" dictionary="ba_cost,cost_code,cost_name" width="120"></t:dgCol>
|
||||
<t:dgCol title="免费天数" field="freeDay" queryMode="single" width="120"></t:dgCol>
|
||||
<t:dgCol title="免费天数2" field="freeDay2" queryMode="single" width="120"></t:dgCol>
|
||||
<t:dgCol title="数据SQL" field="dataSql" queryMode="single" width="120"></t:dgCol>
|
||||
<t:dgCol title="价格RMB" field="costJg" queryMode="single" width="120"></t:dgCol>
|
||||
<t:dgCol title="税率" field="costSl" queryMode="single" width="120"></t:dgCol>
|
||||
<t:dgCol title="折扣" field="costZk" queryMode="single" width="120"></t:dgCol>
|
||||
|
|
|
@ -333,10 +333,10 @@
|
|||
<label class="Validform_label" style="display: none;">免费天数</label>
|
||||
</td>
|
||||
<td align="left">
|
||||
<input name="wmCusCostIList[#index#].freeDay2" maxlength="32"
|
||||
<input name="wmCusCostIList[#index#].dataSql" maxlength="32"
|
||||
ignore="checked"
|
||||
type="text" class="form-control" style="width:120px;" datatype="*">
|
||||
<label class="Validform_label" style="display: none;">免费天数2</label>
|
||||
<label class="Validform_label" style="display: none;">数据SQL</label>
|
||||
</td>
|
||||
<td align="left">
|
||||
<input name="wmCusCostIList[#index#].costSl" maxlength="32"
|
||||
|
|
|
@ -332,10 +332,10 @@
|
|||
<label class="Validform_label" style="display: none;">免费天数</label>
|
||||
</td>
|
||||
<td align="left">
|
||||
<input name="wmCusCostIList[#index#].freeDay2" maxlength="32"
|
||||
<input name="wmCusCostIList[#index#].dataSql" maxlength="32"
|
||||
ignore="checked"
|
||||
type="text" class="form-control" style="width:120px;" datatype="*">
|
||||
<label class="Validform_label" style="display: none;">免费天数2</label>
|
||||
<label class="Validform_label" style="display: none;">数据SQL</label>
|
||||
</td>
|
||||
<td align="left">
|
||||
<input name="wmCusCostIList[#index#].costSl" maxlength="32"
|
||||
|
|
|
@ -44,7 +44,7 @@
|
|||
免费天数
|
||||
</th>
|
||||
<th>
|
||||
免费天数2
|
||||
数据SQL
|
||||
</th>
|
||||
<th>
|
||||
价格RMB
|
||||
|
@ -90,9 +90,9 @@
|
|||
<label class="Validform_label" style="display: none;">免费天数</label>
|
||||
</td>
|
||||
<td>
|
||||
<input name="wmCusCostIList[0].freeDay2" maxlength="32"
|
||||
<input name="wmCusCostIList[0].dataSql" maxlength="32"
|
||||
type="text" class="form-control" style="width:120px;" datatype="*">
|
||||
<label class="Validform_label" style="display: none;">免费天数2</label>
|
||||
<label class="Validform_label" style="display: none;">数据SQL</label>
|
||||
</td>
|
||||
<td>
|
||||
<input name="wmCusCostIList[0].costJg" maxlength="32"
|
||||
|
@ -147,9 +147,9 @@
|
|||
<label class="Validform_label" style="display: none;">免费天数</label>
|
||||
</td>
|
||||
<td align="left">
|
||||
<input name="wmCusCostIList[${stuts.index }].freeDay2" maxlength="32"
|
||||
type="text" class="form-control" style="width:120px;" datatype="*" value="${poVal.freeDay2 }">
|
||||
<label class="Validform_label" style="display: none;">免费天数2</label>
|
||||
<input name="wmCusCostIList[${stuts.index }].dataSql" maxlength="32"
|
||||
type="text" class="form-control" style="width:120px;" datatype="*" value="${poVal.dataSql }">
|
||||
<label class="Validform_label" style="display: none;">数据SQL</label>
|
||||
</td>
|
||||
<td align="left">
|
||||
<input name="wmCusCostIList[${stuts.index }].costJg" maxlength="32"
|
||||
|
|
Loading…
Reference in New Issue