diff --git a/ruoyi-ui/src/api/benyi/child.js b/ruoyi-ui/src/api/benyi/child.js index 371d73db8..d5fba47c5 100644 --- a/ruoyi-ui/src/api/benyi/child.js +++ b/ruoyi-ui/src/api/benyi/child.js @@ -61,6 +61,15 @@ export function updateChild(data) { }) } +// 修改幼儿信息 +export function updateChild_jz(data) { + return request({ + url: '/benyi/child/edit', + method: 'put', + data: data + }) +} + // 修改幼儿信息 export function updateChild_tb(data, id) { return request({ diff --git a/ruoyi-ui/src/api/benyi/contactpeople.js b/ruoyi-ui/src/api/benyi/contactpeople.js index d8465a9a5..a1875aa25 100644 --- a/ruoyi-ui/src/api/benyi/contactpeople.js +++ b/ruoyi-ui/src/api/benyi/contactpeople.js @@ -44,6 +44,15 @@ export function updateContactpeople(data) { }) } +// 修改幼儿紧急情况联系人 +export function updateContactpeople_jz(data) { + return request({ + url: '/benyi/contactpeople/edit', + method: 'put', + data: data + }) +} + // 删除幼儿紧急情况联系人 export function delContactpeople(id) { return request({ diff --git a/ruoyi-ui/src/views/benyi/checkinstatisticsclass/index.vue b/ruoyi-ui/src/views/benyi/checkinstatisticsclass/index.vue index c214c40a7..7268a1054 100644 --- a/ruoyi-ui/src/views/benyi/checkinstatisticsclass/index.vue +++ b/ruoyi-ui/src/views/benyi/checkinstatisticsclass/index.vue @@ -176,6 +176,7 @@ export default { }, getList() { this.loading = true; + this.tableData = []; if (this.queryParams.month == "") { this.queryParams.month = this.month; } @@ -271,7 +272,7 @@ export default { } if (res.indexOf("%") != -1) { // console.log(res.split("%")[0]); - sum = sum + parseInt(res.split("%")[0])/100; + sum = sum + parseInt(res.split("%")[0]) / 100; } } }); diff --git a/ruoyi-ui/src/views/benyi/child_preserve/index.vue b/ruoyi-ui/src/views/benyi/child_preserve/index.vue index 311bc8ce1..dabe6abc5 100644 --- a/ruoyi-ui/src/views/benyi/child_preserve/index.vue +++ b/ruoyi-ui/src/views/benyi/child_preserve/index.vue @@ -308,14 +308,10 @@ </template> <script> -import { getChild_query, updateChild } from "@/api/benyi/child"; +import { getChild_query, updateChild_jz } from "@/api/benyi/child"; import { - listContactpeople, getContactpeople, - getContactpeopleByChildId, - delContactpeople, - addContactpeople, - updateContactpeople, + updateContactpeople_jz, } from "@/api/benyi/contactpeople"; import { listClass } from "@/api/system/class"; @@ -462,10 +458,10 @@ export default { this.$refs["form"].validate(valid => { if (valid) { if (this.form.id != undefined) { - updateChild(this.form).then(response => { + updateChild_jz(this.form).then(response => { if (response.code === 200) { this.form_jhr.childid = this.form.id; - updateContactpeople(this.form_jhr).then(response => { + updateContactpeople_jz(this.form_jhr).then(response => { if (response.code === 200) { this.msgSuccess("修改成功"); // this.hide = false; diff --git a/ruoyi/src/main/java/com/ruoyi/framework/config/SecurityConfig.java b/ruoyi/src/main/java/com/ruoyi/framework/config/SecurityConfig.java index 411a23e90..a05c525ac 100644 --- a/ruoyi/src/main/java/com/ruoyi/framework/config/SecurityConfig.java +++ b/ruoyi/src/main/java/com/ruoyi/framework/config/SecurityConfig.java @@ -105,12 +105,13 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter { .antMatchers("/benyi/experience/add").anonymous()//半日入园体验申请 .antMatchers("/benyi/experience/getInfo**").anonymous()//半日入园体验明细 .antMatchers("/benyi/halfdayplan/getInfo/**").anonymous()//半日入园内容 - .antMatchers("/benyi/child/add").anonymous()//幼儿维护申请 - .antMatchers("/benyi/child/edit**").anonymous()//幼儿维护修改 +// .antMatchers("/benyi/child/add").anonymous()//幼儿维护申请 + .antMatchers("/benyi/child/edit").anonymous()//幼儿维护修改 .antMatchers("/benyi/child/getChild_query").anonymous()//幼儿维护申请明细 - .antMatchers("/benyi/contactpeople/add").anonymous()//家长维护申请 - .antMatchers("/benyi/contactpeople/edit**").anonymous()//家长维护修改 +// .antMatchers("/benyi/contactpeople/add").anonymous()//家长维护申请 + .antMatchers("/benyi/contactpeople/edit").anonymous()//家长维护修改 .antMatchers("/benyi/contactpeople/getInfo**").anonymous()//监护人维护明细 + .antMatchers("/benyi/child/getInfo").anonymous()//幼儿信息维护明细 // 除上面外的所有请求全部需要鉴权认证 .anyRequest().authenticated() diff --git a/ruoyi/src/main/java/com/ruoyi/project/benyi/controller/ByChildContactpeopleController.java b/ruoyi/src/main/java/com/ruoyi/project/benyi/controller/ByChildContactpeopleController.java index 3cce15b50..eb7242a78 100644 --- a/ruoyi/src/main/java/com/ruoyi/project/benyi/controller/ByChildContactpeopleController.java +++ b/ruoyi/src/main/java/com/ruoyi/project/benyi/controller/ByChildContactpeopleController.java @@ -118,6 +118,19 @@ public class ByChildContactpeopleController extends BaseController { } } + @PutMapping("/edit") + public AjaxResult editContactpeople(@RequestBody ByChildContactpeople byChildContactpeople) { + //如果存在,就更新,否则删除 + ByChildContactpeople byChildContactpeoplenew = new ByChildContactpeople(); + byChildContactpeoplenew.setChildid(byChildContactpeople.getChildid()); + List<ByChildContactpeople> list = byChildContactpeopleService.selectByChildContactpeopleList(byChildContactpeoplenew); + if (list != null && list.size() > 0) { + return toAjax(byChildContactpeopleService.updateByChildContactpeople(byChildContactpeople)); + } else { + return toAjax(byChildContactpeopleService.insertByChildContactpeople(byChildContactpeople)); + } + } + /** * 删除幼儿紧急情况联系人 */ diff --git a/ruoyi/src/main/java/com/ruoyi/project/benyi/controller/ByChildController.java b/ruoyi/src/main/java/com/ruoyi/project/benyi/controller/ByChildController.java index 682b97b0a..2b9e60848 100644 --- a/ruoyi/src/main/java/com/ruoyi/project/benyi/controller/ByChildController.java +++ b/ruoyi/src/main/java/com/ruoyi/project/benyi/controller/ByChildController.java @@ -240,6 +240,11 @@ public class ByChildController extends BaseController { return toAjax(byChildService.updateByChild(byChild)); } + @PutMapping("/edit") + public AjaxResult editchild(@RequestBody ByChild byChild) { + return toAjax(byChildService.updateByChild(byChild)); + } + /** * 修改幼儿信息 */