托费历史数据
This commit is contained in:
parent
d7b0b9f074
commit
372246c212
@ -46,6 +46,8 @@
|
|||||||
<el-table-column label="伙食费(小班)/天" align="center" prop="hsfX" />
|
<el-table-column label="伙食费(小班)/天" align="center" prop="hsfX" />
|
||||||
<el-table-column label="保育费(托班)/月" align="center" prop="byfT" />
|
<el-table-column label="保育费(托班)/月" align="center" prop="byfT" />
|
||||||
<el-table-column label="伙食费(托班)/天" align="center" prop="hsfT" />
|
<el-table-column label="伙食费(托班)/天" align="center" prop="hsfT" />
|
||||||
|
<el-table-column label="开始时间" align="center" prop="startTime" />
|
||||||
|
<el-table-column label="截止时间" align="center" prop="endtime" />
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="操作"
|
label="操作"
|
||||||
align="center"
|
align="center"
|
||||||
@ -141,6 +143,18 @@
|
|||||||
placeholder="请输入伙食费"
|
placeholder="请输入伙食费"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item label="起止时间" prop="startTime">
|
||||||
|
<el-date-picker
|
||||||
|
clearable
|
||||||
|
class="my-date-picker"
|
||||||
|
v-model="form.startTime"
|
||||||
|
type="daterange"
|
||||||
|
value-format="yyyy-MM-dd"
|
||||||
|
range-separator="-"
|
||||||
|
start-placeholder="开始日期"
|
||||||
|
end-placeholder="结束日期"
|
||||||
|
></el-date-picker>
|
||||||
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<div slot="footer" class="dialog-footer">
|
<div slot="footer" class="dialog-footer">
|
||||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||||
@ -191,7 +205,11 @@ export default {
|
|||||||
// 表单参数
|
// 表单参数
|
||||||
form: {},
|
form: {},
|
||||||
// 表单校验
|
// 表单校验
|
||||||
rules: {},
|
rules: {
|
||||||
|
startTime: [
|
||||||
|
{ required: true, message: "起止时间不能为空", trigger: "blur" },
|
||||||
|
],
|
||||||
|
},
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
@ -227,6 +245,8 @@ export default {
|
|||||||
hsfT: undefined,
|
hsfT: undefined,
|
||||||
createUserid: undefined,
|
createUserid: undefined,
|
||||||
createTime: undefined,
|
createTime: undefined,
|
||||||
|
startTime: undefined,
|
||||||
|
endtime: undefined,
|
||||||
};
|
};
|
||||||
this.resetForm("form");
|
this.resetForm("form");
|
||||||
},
|
},
|
||||||
@ -244,8 +264,16 @@ export default {
|
|||||||
this.title = "添加园所收费标准";
|
this.title = "添加园所收费标准";
|
||||||
} else {
|
} else {
|
||||||
const id = row.id || this.ids;
|
const id = row.id || this.ids;
|
||||||
|
var myArray = new Array(2);
|
||||||
getSchoolcharge(id).then((response) => {
|
getSchoolcharge(id).then((response) => {
|
||||||
this.form = response.data;
|
this.form = response.data;
|
||||||
|
//console.log(response.data);
|
||||||
|
if (response.data.endtime != null) {
|
||||||
|
myArray[0] = response.data.startTime;
|
||||||
|
myArray[1] = response.data.endtime;
|
||||||
|
this.form.startTime = myArray;
|
||||||
|
}
|
||||||
|
|
||||||
this.open = true;
|
this.open = true;
|
||||||
this.title = "设置园所收费标准";
|
this.title = "设置园所收费标准";
|
||||||
});
|
});
|
||||||
@ -255,6 +283,10 @@ export default {
|
|||||||
submitForm: function () {
|
submitForm: function () {
|
||||||
this.$refs["form"].validate((valid) => {
|
this.$refs["form"].validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
|
var v1 = this.form.startTime[0];
|
||||||
|
var v2 = this.form.startTime[1];
|
||||||
|
this.form.startTime = v1;
|
||||||
|
this.form.endtime = v2;
|
||||||
if (this.form.id != undefined) {
|
if (this.form.id != undefined) {
|
||||||
updateSchoolcharge(this.form).then((response) => {
|
updateSchoolcharge(this.form).then((response) => {
|
||||||
if (response.code === 200) {
|
if (response.code === 200) {
|
||||||
@ -302,4 +334,8 @@ export default {
|
|||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.my-date-picker {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
@ -51,14 +51,24 @@ public class BySchoolchargeController extends BaseController {
|
|||||||
@PreAuthorize("@ss.hasPermi('benyi:schoolcharge:list')")
|
@PreAuthorize("@ss.hasPermi('benyi:schoolcharge:list')")
|
||||||
@GetMapping("/child/list")
|
@GetMapping("/child/list")
|
||||||
public TableDataInfo childlist(BySchoolcharge bySchoolcharge) {
|
public TableDataInfo childlist(BySchoolcharge bySchoolcharge) {
|
||||||
startPage();
|
System.out.println("month---" + bySchoolcharge.getMonth());
|
||||||
List<BySchoolcharge> list = bySchoolchargeService.selectByChildchargeList(bySchoolcharge);
|
bySchoolcharge.setMonthday(bySchoolcharge.getMonth() + "-15");
|
||||||
if (list != null && list.size() > 0) {
|
List<BySchoolcharge> listScope = bySchoolchargeService.selectByChildchargeListByMonth(bySchoolcharge);
|
||||||
for (int i = 0; i < list.size(); i++) {
|
if (listScope != null && listScope.size() > 0) {
|
||||||
list.get(i).setZj(getZongji(list.get(i)));
|
bySchoolcharge.setId(listScope.get(0).getId());
|
||||||
|
startPage();
|
||||||
|
List<BySchoolcharge> list = bySchoolchargeService.selectByChildchargeList(bySchoolcharge);
|
||||||
|
if (list != null && list.size() > 0) {
|
||||||
|
for (int i = 0; i < list.size(); i++) {
|
||||||
|
list.get(i).setZj(getZongji(list.get(i)));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
return getDataTable(list);
|
||||||
|
} else {
|
||||||
|
bySchoolcharge.setId(Long.valueOf(0));
|
||||||
|
List<BySchoolcharge> list = bySchoolchargeService.selectByChildchargeList(bySchoolcharge);
|
||||||
|
return getDataTable(list);
|
||||||
}
|
}
|
||||||
return getDataTable(list);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//根据每条幼儿统计数计算总费用
|
//根据每条幼儿统计数计算总费用
|
||||||
@ -154,7 +164,23 @@ public class BySchoolchargeController extends BaseController {
|
|||||||
@Log(title = "园所收费标准", businessType = BusinessType.UPDATE)
|
@Log(title = "园所收费标准", businessType = BusinessType.UPDATE)
|
||||||
@PutMapping
|
@PutMapping
|
||||||
public AjaxResult edit(@RequestBody BySchoolcharge bySchoolcharge) {
|
public AjaxResult edit(@RequestBody BySchoolcharge bySchoolcharge) {
|
||||||
return toAjax(bySchoolchargeService.updateBySchoolcharge(bySchoolcharge));
|
int iCount = 0;
|
||||||
|
BySchoolcharge bySchoolchargeNew = bySchoolchargeService.selectBySchoolchargeById(bySchoolcharge.getId());
|
||||||
|
if (bySchoolcharge.getStartTime().equals(bySchoolchargeNew.getStartTime())) {
|
||||||
|
if (bySchoolcharge.getEndtime().equals(bySchoolchargeNew.getEndtime())) {
|
||||||
|
iCount = iCount + bySchoolchargeService.updateBySchoolcharge(bySchoolcharge);
|
||||||
|
} else {
|
||||||
|
bySchoolchargeNew.setIsdel("1");
|
||||||
|
iCount = iCount + bySchoolchargeService.updateBySchoolcharge(bySchoolchargeNew);
|
||||||
|
iCount = iCount + bySchoolchargeService.insertBySchoolcharge(bySchoolcharge);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
bySchoolchargeNew.setIsdel("1");
|
||||||
|
iCount = iCount + bySchoolchargeService.updateBySchoolcharge(bySchoolchargeNew);
|
||||||
|
iCount = iCount + bySchoolchargeService.insertBySchoolcharge(bySchoolcharge);
|
||||||
|
}
|
||||||
|
|
||||||
|
return toAjax(iCount);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1,11 +1,14 @@
|
|||||||
package com.ruoyi.project.benyi.domain;
|
package com.ruoyi.project.benyi.domain;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
import com.ruoyi.project.system.domain.SysDept;
|
import com.ruoyi.project.system.domain.SysDept;
|
||||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||||
import com.ruoyi.framework.aspectj.lang.annotation.Excel;
|
import com.ruoyi.framework.aspectj.lang.annotation.Excel;
|
||||||
import com.ruoyi.framework.web.domain.BaseEntity;
|
import com.ruoyi.framework.web.domain.BaseEntity;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 园所收费标准对象 by_schoolcharge
|
* 园所收费标准对象 by_schoolcharge
|
||||||
*
|
*
|
||||||
@ -80,10 +83,58 @@ public class BySchoolcharge extends BaseEntity {
|
|||||||
@Excel(name = "伙食费中班")
|
@Excel(name = "伙食费中班")
|
||||||
private Double hsfZ;
|
private Double hsfZ;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 起止时间
|
||||||
|
*/
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||||
|
private Date startTime;
|
||||||
|
|
||||||
|
public Date getStartTime() {
|
||||||
|
return startTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setStartTime(Date startTime) {
|
||||||
|
this.startTime = startTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Date getEndtime() {
|
||||||
|
return endtime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setEndtime(Date endtime) {
|
||||||
|
this.endtime = endtime;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 起止时间
|
||||||
|
*/
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||||
|
private Date endtime;
|
||||||
|
|
||||||
|
public String getIsdel() {
|
||||||
|
return isdel;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setIsdel(String isdel) {
|
||||||
|
this.isdel = isdel;
|
||||||
|
}
|
||||||
|
|
||||||
|
private String isdel;
|
||||||
|
|
||||||
private SysDept dept;
|
private SysDept dept;
|
||||||
|
|
||||||
// 幼儿考勤系统属性
|
// 幼儿考勤系统属性
|
||||||
private String month;
|
private String month;
|
||||||
|
|
||||||
|
public String getMonthday() {
|
||||||
|
return monthday;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMonthday(String monthday) {
|
||||||
|
this.monthday = monthday;
|
||||||
|
}
|
||||||
|
|
||||||
|
private String monthday;
|
||||||
private String name;
|
private String name;
|
||||||
private String classid;
|
private String classid;
|
||||||
private Long days;
|
private Long days;
|
||||||
@ -256,6 +307,10 @@ public class BySchoolcharge extends BaseEntity {
|
|||||||
.append("bjtype", getBjtype())
|
.append("bjtype", getBjtype())
|
||||||
.append("days", getDays())
|
.append("days", getDays())
|
||||||
.append("zj", getZj())
|
.append("zj", getZj())
|
||||||
|
.append("startTime",getStartTime())
|
||||||
|
.append("endtime",getEndtime())
|
||||||
|
.append("isdel",getIsdel())
|
||||||
|
.append("monthday",getMonthday())
|
||||||
.toString();
|
.toString();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -35,6 +35,14 @@ public interface BySchoolchargeMapper {
|
|||||||
*/
|
*/
|
||||||
public List<BySchoolcharge> selectByChildchargeList(BySchoolcharge bySchoolcharge);
|
public List<BySchoolcharge> selectByChildchargeList(BySchoolcharge bySchoolcharge);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询幼儿收费列表
|
||||||
|
*
|
||||||
|
* @param bySchoolcharge 收费标准
|
||||||
|
* @return 幼儿收费集合
|
||||||
|
*/
|
||||||
|
public List<BySchoolcharge> selectByChildchargeListByMonth(BySchoolcharge bySchoolcharge);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增园所收费标准
|
* 新增园所收费标准
|
||||||
*
|
*
|
||||||
|
@ -35,6 +35,15 @@ public interface IBySchoolchargeService {
|
|||||||
*/
|
*/
|
||||||
public List<BySchoolcharge> selectByChildchargeList(BySchoolcharge bySchoolcharge);
|
public List<BySchoolcharge> selectByChildchargeList(BySchoolcharge bySchoolcharge);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询幼儿收费列表
|
||||||
|
*
|
||||||
|
* @param bySchoolcharge 收费标准
|
||||||
|
* @return 幼儿收费集合
|
||||||
|
*/
|
||||||
|
public List<BySchoolcharge> selectByChildchargeListByMonth(BySchoolcharge bySchoolcharge);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增园所收费标准
|
* 新增园所收费标准
|
||||||
*
|
*
|
||||||
|
@ -52,10 +52,22 @@ public class BySchoolchargeServiceImpl implements IBySchoolchargeService {
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
@DataScope(deptAlias = "b")
|
@DataScope(deptAlias = "b")
|
||||||
public List<BySchoolcharge> selectByChildchargeList(BySchoolcharge bySchoolcharge){
|
public List<BySchoolcharge> selectByChildchargeList(BySchoolcharge bySchoolcharge) {
|
||||||
return bySchoolchargeMapper.selectByChildchargeList(bySchoolcharge);
|
return bySchoolchargeMapper.selectByChildchargeList(bySchoolcharge);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询幼儿收费列表
|
||||||
|
*
|
||||||
|
* @param bySchoolcharge 收费标准
|
||||||
|
* @return 幼儿收费集合
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@DataScope(deptAlias = "b")
|
||||||
|
public List<BySchoolcharge> selectByChildchargeListByMonth(BySchoolcharge bySchoolcharge) {
|
||||||
|
return bySchoolchargeMapper.selectByChildchargeListByMonth(bySchoolcharge);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增园所收费标准
|
* 新增园所收费标准
|
||||||
*
|
*
|
||||||
|
@ -17,7 +17,11 @@
|
|||||||
<result property="hsfT" column="hsf_t"/>
|
<result property="hsfT" column="hsf_t"/>
|
||||||
<result property="byfZ" column="byf_z"/>
|
<result property="byfZ" column="byf_z"/>
|
||||||
<result property="hsfZ" column="hsf_z"/>
|
<result property="hsfZ" column="hsf_z"/>
|
||||||
|
<result property="startTime" column="start_time"/>
|
||||||
|
<result property="endtime" column="endtime"/>
|
||||||
|
<result property="isdel" column="isdel"/>
|
||||||
<result property="month" column="month"/>
|
<result property="month" column="month"/>
|
||||||
|
<result property="monthday" column="monthday"/>
|
||||||
<result property="name" column="name"/>
|
<result property="name" column="name"/>
|
||||||
<result property="classid" column="classid"/>
|
<result property="classid" column="classid"/>
|
||||||
<result property="days" column="days"/>
|
<result property="days" column="days"/>
|
||||||
@ -35,13 +39,13 @@
|
|||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<sql id="selectBySchoolchargeVo">
|
<sql id="selectBySchoolchargeVo">
|
||||||
select a.id, a.dept_id, a.byf, a.hsf, a.create_userid, a.create_time,a.byf_x, a.hsf_x, a.byf_t, a.hsf_t, a.byf_z, a.hsf_z,b.dept_name from by_schoolcharge a
|
select a.id, a.dept_id, a.byf, a.hsf, a.create_userid, a.create_time,a.byf_x, a.hsf_x, a.byf_t, a.hsf_t, a.byf_z, a.hsf_z,a.start_time,a.endtime,a.isdel,b.dept_name from by_schoolcharge a
|
||||||
right join sys_dept b on a.dept_id=b.dept_id
|
right join sys_dept b on a.dept_id=b.dept_id
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<select id="selectBySchoolchargeList" parameterType="BySchoolcharge" resultMap="BySchoolchargeResult">
|
<select id="selectBySchoolchargeList" parameterType="BySchoolcharge" resultMap="BySchoolchargeResult">
|
||||||
<include refid="selectBySchoolchargeVo"/>
|
<include refid="selectBySchoolchargeVo"/>
|
||||||
where school_id is not null and del_flag=0
|
where school_id is not null and del_flag=0 and isdel=0
|
||||||
<if test="byf != null ">and byf = #{byf}</if>
|
<if test="byf != null ">and byf = #{byf}</if>
|
||||||
<if test="hsf != null ">and hsf = #{hsf}</if>
|
<if test="hsf != null ">and hsf = #{hsf}</if>
|
||||||
<if test="createUserid != null ">and create_userid = #{createUserid}</if>
|
<if test="createUserid != null ">and create_userid = #{createUserid}</if>
|
||||||
@ -49,6 +53,19 @@
|
|||||||
${dataScope}
|
${dataScope}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="selectByChildchargeListByMonth" parameterType="BySchoolcharge" resultMap="BySchoolchargeResult">
|
||||||
|
<include refid="selectBySchoolchargeVo"/>
|
||||||
|
where school_id is not null and del_flag=0
|
||||||
|
<if test="monthday != null and monthday != ''"><!-- 开始时间检索 -->
|
||||||
|
AND date_format(start_time,'%y%m%d') <= date_format(#{monthday},'%y%m%d')
|
||||||
|
</if>
|
||||||
|
<if test="monthday != null and monthday != ''"><!-- 结束时间检索 -->
|
||||||
|
AND date_format(endtime,'%y%m%d') >= date_format(#{monthday},'%y%m%d')
|
||||||
|
</if>
|
||||||
|
<!-- 数据范围过滤 -->
|
||||||
|
${dataScope}
|
||||||
|
</select>
|
||||||
|
|
||||||
<select id="selectByChildchargeList" parameterType="BySchoolcharge" resultMap="BySchoolchargeResult">
|
<select id="selectByChildchargeList" parameterType="BySchoolcharge" resultMap="BySchoolchargeResult">
|
||||||
select a.name,a.classid,
|
select a.name,a.classid,
|
||||||
c.bjtype,
|
c.bjtype,
|
||||||
@ -59,7 +76,7 @@
|
|||||||
from by_child a
|
from by_child a
|
||||||
left join by_class c on a.classid=c.bjbh
|
left join by_class c on a.classid=c.bjbh
|
||||||
left join by_schoolcharge b on a.schoolid=b.dept_id
|
left join by_schoolcharge b on a.schoolid=b.dept_id
|
||||||
where c.bjbh = #{classid}
|
where c.bjbh = #{classid} and b.id=#{id}
|
||||||
<!-- 数据范围过滤 -->
|
<!-- 数据范围过滤 -->
|
||||||
${dataScope}
|
${dataScope}
|
||||||
</select>
|
</select>
|
||||||
@ -83,6 +100,9 @@
|
|||||||
<if test="hsfT != null ">hsf_t,</if>
|
<if test="hsfT != null ">hsf_t,</if>
|
||||||
<if test="byfZ != null and byfZ != ''">byf_z,</if>
|
<if test="byfZ != null and byfZ != ''">byf_z,</if>
|
||||||
<if test="hsfZ != null ">hsf_z,</if>
|
<if test="hsfZ != null ">hsf_z,</if>
|
||||||
|
<if test="startTime != null ">start_time,</if>
|
||||||
|
<if test="endtime != null ">endtime,</if>
|
||||||
|
<if test="isdel != null and isdel != ''">isdel,</if>
|
||||||
</trim>
|
</trim>
|
||||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
<if test="deptId != null ">#{deptId},</if>
|
<if test="deptId != null ">#{deptId},</if>
|
||||||
@ -96,6 +116,9 @@
|
|||||||
<if test="hsfT != null ">#{hsfT},</if>
|
<if test="hsfT != null ">#{hsfT},</if>
|
||||||
<if test="byfZ != null and byfZ != ''">#{byfZ},</if>
|
<if test="byfZ != null and byfZ != ''">#{byfZ},</if>
|
||||||
<if test="hsfZ != null ">#{hsfZ},</if>
|
<if test="hsfZ != null ">#{hsfZ},</if>
|
||||||
|
<if test="startTime != null ">#{startTime},</if>
|
||||||
|
<if test="endtime != null ">#{endtime},</if>
|
||||||
|
<if test="isdel != null and isdel != ''">#{isdel},</if>
|
||||||
</trim>
|
</trim>
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
@ -113,6 +136,9 @@
|
|||||||
<if test="hsfT != null ">hsf_t = #{hsfT},</if>
|
<if test="hsfT != null ">hsf_t = #{hsfT},</if>
|
||||||
<if test="byfZ != null and byfZ != ''">byf_z = #{byfZ},</if>
|
<if test="byfZ != null and byfZ != ''">byf_z = #{byfZ},</if>
|
||||||
<if test="hsfZ != null ">hsf_z = #{hsfZ},</if>
|
<if test="hsfZ != null ">hsf_z = #{hsfZ},</if>
|
||||||
|
<if test="startTime != null ">start_time = #{startTime},</if>
|
||||||
|
<if test="endtime != null ">endtime = #{endtime},</if>
|
||||||
|
<if test="isdel != null and isdel != ''">isdel = #{isdel},</if>
|
||||||
</trim>
|
</trim>
|
||||||
where id = #{id}
|
where id = #{id}
|
||||||
</update>
|
</update>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user