Commit 4278cd0a authored by KeYong's avatar KeYong

更新

parent 3839b2b5
...@@ -14,7 +14,6 @@ import org.typroject.tyboot.core.restful.doc.TycloudOperation; ...@@ -14,7 +14,6 @@ import org.typroject.tyboot.core.restful.doc.TycloudOperation;
import org.typroject.tyboot.core.restful.utils.ResponseHelper; import org.typroject.tyboot.core.restful.utils.ResponseHelper;
import org.typroject.tyboot.core.restful.utils.ResponseModel; import org.typroject.tyboot.core.restful.utils.ResponseModel;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import java.text.ParseException; import java.text.ParseException;
import java.util.List; import java.util.List;
......
...@@ -14,6 +14,7 @@ import java.util.*; ...@@ -14,6 +14,7 @@ import java.util.*;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import com.yeejoin.amos.boot.module.common.biz.service.impl.DutyPersonShiftServiceImpl; import com.yeejoin.amos.boot.module.common.biz.service.impl.DutyPersonShiftServiceImpl;
import org.typroject.tyboot.core.foundation.context.RequestContext;
import org.typroject.tyboot.core.restful.utils.ResponseHelper; import org.typroject.tyboot.core.restful.utils.ResponseHelper;
import org.typroject.tyboot.core.restful.utils.ResponseModel; import org.typroject.tyboot.core.restful.utils.ResponseModel;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
...@@ -50,6 +51,8 @@ public class DutyPersonShiftController extends BaseController { ...@@ -50,6 +51,8 @@ public class DutyPersonShiftController extends BaseController {
@ApiOperation(httpMethod = "POST", value = "新增值班人员日期关联关系表", notes = "新增值班人员日期关联关系表") @ApiOperation(httpMethod = "POST", value = "新增值班人员日期关联关系表", notes = "新增值班人员日期关联关系表")
public ResponseModel<DutyPersonShiftDto> save(@RequestBody DutyPersonShiftDto model) public ResponseModel<DutyPersonShiftDto> save(@RequestBody DutyPersonShiftDto model)
{ {
String appKey = RequestContext.getAppKey();
model.setAppKey(appKey);
model=dutyPersonShiftServiceImpl.createWithModel(model); model=dutyPersonShiftServiceImpl.createWithModel(model);
return ResponseHelper.buildResponse(model); return ResponseHelper.buildResponse(model);
} }
...@@ -62,7 +65,9 @@ public class DutyPersonShiftController extends BaseController { ...@@ -62,7 +65,9 @@ public class DutyPersonShiftController extends BaseController {
@PutMapping(value = "/{sequenceNbr}") @PutMapping(value = "/{sequenceNbr}")
@ApiOperation(httpMethod = "PUT", value = "根据sequenceNbr更新值班人员日期关联关系表", notes = "根据sequenceNbr更新值班人员日期关联关系表") @ApiOperation(httpMethod = "PUT", value = "根据sequenceNbr更新值班人员日期关联关系表", notes = "根据sequenceNbr更新值班人员日期关联关系表")
public ResponseModel<DutyPersonShiftDto> updateBySequenceNbrDutyPersonShift(@RequestBody DutyPersonShiftDto model,@PathVariable(value = "sequenceNbr") Long sequenceNbr) { public ResponseModel<DutyPersonShiftDto> updateBySequenceNbrDutyPersonShift(@RequestBody DutyPersonShiftDto model,@PathVariable(value = "sequenceNbr") Long sequenceNbr) {
model.setSequenceNbr(sequenceNbr); String appKey = RequestContext.getAppKey();
model.setAppKey(appKey);
model.setSequenceNbr(sequenceNbr);
return ResponseHelper.buildResponse(dutyPersonShiftServiceImpl.updateWithModel(model)); return ResponseHelper.buildResponse(dutyPersonShiftServiceImpl.updateWithModel(model));
} }
/** /**
......
package com.yeejoin.amos.boot.module.common.biz.service.impl; package com.yeejoin.amos.boot.module.common.biz.service.impl;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.module.common.api.dto.DutyShiftDto;
import com.yeejoin.amos.boot.module.common.api.entity.DutyShift; import com.yeejoin.amos.boot.module.common.api.entity.DutyShift;
import com.yeejoin.amos.boot.module.common.api.mapper.DutyShiftMapper; import com.yeejoin.amos.boot.module.common.api.mapper.DutyShiftMapper;
import com.yeejoin.amos.boot.module.common.api.service.IDutyShiftService; import com.yeejoin.amos.boot.module.common.api.service.IDutyShiftService;
import com.yeejoin.amos.boot.module.common.api.dto.DutyShiftDto;
import org.typroject.tyboot.core.rdbms.service.BaseService;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import org.typroject.tyboot.core.rdbms.service.BaseService;
import java.util.List; import java.util.List;
/** /**
* 值班班次服务实现类 * 值班班次服务实现类
...@@ -17,14 +18,14 @@ import java.util.List; ...@@ -17,14 +18,14 @@ import java.util.List;
@Service @Service
public class DutyShiftServiceImpl extends BaseService<DutyShiftDto,DutyShift,DutyShiftMapper> implements IDutyShiftService { public class DutyShiftServiceImpl extends BaseService<DutyShiftDto,DutyShift,DutyShiftMapper> implements IDutyShiftService {
/** /**
* 分页查询 * 分页查询
*/ */
public Page<DutyShiftDto> queryForDutyShiftPage(Page<DutyShiftDto> page, String appKey) { public Page<DutyShiftDto> queryForDutyShiftPage(Page<DutyShiftDto> page, String appKey) {
return this.queryForPage(page, null, false, appKey); return this.queryForPage(page, null, false, appKey);
} }
/** /**
* 列表查询 示例 * 列表查询 示例
*/ */
public List<DutyShiftDto> queryForDutyShiftList(String appKey) { public List<DutyShiftDto> queryForDutyShiftList(String appKey) {
return this.queryForList("" , false, appKey); return this.queryForList("" , false, appKey);
......
...@@ -527,7 +527,7 @@ public class ExcelController extends BaseController { ...@@ -527,7 +527,7 @@ public class ExcelController extends BaseController {
private String[] getDutyNameList() { private String[] getDutyNameList() {
List<String> dutyShiftList = new ArrayList<>(); List<String> dutyShiftList = new ArrayList<>();
List<DutyShiftDto> dutyShiftDtoList = dutyShiftService.queryForDutyShiftList(); List<DutyShiftDto> dutyShiftDtoList = dutyShiftService.queryForDutyShiftList(null);
dutyShiftDtoList.forEach(item -> dutyShiftList.add(item.getName() + "@" + item.getSequenceNbr())); dutyShiftDtoList.forEach(item -> dutyShiftList.add(item.getName() + "@" + item.getSequenceNbr()));
String[] dutyNameList = dutyShiftList.toArray(new String[dutyShiftList.size()]); String[] dutyNameList = dutyShiftList.toArray(new String[dutyShiftList.size()]);
return dutyNameList; return dutyNameList;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment