一日流程评估 优化
This commit is contained in:
parent
5d8bb89831
commit
988d9fd254
@ -123,6 +123,7 @@
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
v-show="!checkRemoveable(scope.row)"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['benyi:dayflowassessment:remove']"
|
||||
>删除</el-button
|
||||
@ -341,6 +342,16 @@ export default {
|
||||
|
||||
return status == "1" || !this.CompareDate(row.createTime, y + "/" + m);
|
||||
},
|
||||
//控制按钮可用
|
||||
checkRemoveable(row) {
|
||||
console.log(row.remark);
|
||||
var remark = row.remark;
|
||||
if (remark == "" || remark == null) {
|
||||
return false;
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
},
|
||||
//比较日期大小
|
||||
CompareDate(d1, d2) {
|
||||
//return new Date(d1.replace(/-/g, "/")) > new Date(d2.replace(/-/g, "/"));
|
||||
|
@ -291,6 +291,19 @@ public class ByDayflowassessmentController extends BaseController {
|
||||
@Log(title = "幼儿园一日流程评估", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids) {
|
||||
//判断当前评估是不是配班和助理教师评估,如果是的话,应该删除对应的主班教师评估
|
||||
for (int i = 0; i < ids.length; i++) {
|
||||
ByDayflowassessment byDayflowassessment = new ByDayflowassessment();
|
||||
byDayflowassessment.setRemark(ids[i].toString());
|
||||
List<ByDayflowassessment> list = byDayflowassessmentService.selectByDayflowassessmentList(byDayflowassessment);
|
||||
if (list != null && list.size() > 0) {
|
||||
Long newId=list.get(0).getId();
|
||||
//删除item数据
|
||||
byDayflowassessmentitemService.deleteByDayflowassessmentitemByPid(newId);
|
||||
//删除主数据
|
||||
byDayflowassessmentService.deleteByDayflowassessmentById(newId);
|
||||
}
|
||||
}
|
||||
//先删除item数据
|
||||
for (int i = 0; i < ids.length; i++) {
|
||||
byDayflowassessmentitemService.deleteByDayflowassessmentitemByPid(ids[i]);
|
||||
|
@ -69,7 +69,7 @@
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectByDayflowassessmentVo">
|
||||
select d.id, d.planid, d.dept_id, d.classid, e.bjmc, d.bzbh, d.bzxm, d.pbbh, d.pbxm, d.zlbh, d.zlxm, d.xnxq, d.bzid, d.bzmf, d.kfz, d.kfcs, d.zzdf, d.classdf, d.items, d.values, d.pgdx, f.nick_name as pgdxxm, d.create_userid, d.create_time, d.status,
|
||||
select d.id, d.planid, d.dept_id, d.classid, e.bjmc, d.bzbh, d.bzxm, d.pbbh, d.pbxm, d.zlbh, d.zlxm, d.xnxq, d.bzid, d.bzmf, d.kfz, d.kfcs, d.zzdf, d.classdf, d.items, d.values, d.pgdx, f.nick_name as pgdxxm, d.create_userid, d.create_time, d.status, d.remark,
|
||||
(select sum(b.value) from by_dayflowassessmentitem b where d.id=b.pid and b.item in (select id from by_day_flow where name='早间接待')) as zjjdpjf,
|
||||
(select sum(b.value) from by_dayflowassessmentitem b where d.id=b.pid and b.item in (select id from by_day_flow where name='用餐')) as ycpjf,
|
||||
(select sum(b.value) from by_dayflowassessmentitem b where d.id=b.pid and b.item in (select id from by_day_flow where name='早间坐圈')) as zjzqpjf,
|
||||
|
Loading…
x
Reference in New Issue
Block a user