Commit 4278cd0a authored by KeYong's avatar KeYong

更新

parent 3839b2b5
......@@ -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.ResponseModel;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.text.ParseException;
import java.util.List;
......
......@@ -14,6 +14,7 @@ import java.util.*;
import java.util.stream.Collectors;
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.ResponseModel;
import org.springframework.beans.factory.annotation.Autowired;
......@@ -50,6 +51,8 @@ public class DutyPersonShiftController extends BaseController {
@ApiOperation(httpMethod = "POST", value = "新增值班人员日期关联关系表", notes = "新增值班人员日期关联关系表")
public ResponseModel<DutyPersonShiftDto> save(@RequestBody DutyPersonShiftDto model)
{
String appKey = RequestContext.getAppKey();
model.setAppKey(appKey);
model=dutyPersonShiftServiceImpl.createWithModel(model);
return ResponseHelper.buildResponse(model);
}
......@@ -62,7 +65,9 @@ public class DutyPersonShiftController extends BaseController {
@PutMapping(value = "/{sequenceNbr}")
@ApiOperation(httpMethod = "PUT", value = "根据sequenceNbr更新值班人员日期关联关系表", notes = "根据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));
}
/**
......
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.mapper.DutyShiftMapper;
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 com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.typroject.tyboot.core.rdbms.service.BaseService;
import java.util.List;
/**
* 值班班次服务实现类
......@@ -17,14 +18,14 @@ import java.util.List;
@Service
public class DutyShiftServiceImpl extends BaseService<DutyShiftDto,DutyShift,DutyShiftMapper> implements IDutyShiftService {
/**
* 分页查询
* 分页查询
*/
public Page<DutyShiftDto> queryForDutyShiftPage(Page<DutyShiftDto> page, String appKey) {
return this.queryForPage(page, null, false, appKey);
}
/**
* 列表查询 示例
* 列表查询 示例
*/
public List<DutyShiftDto> queryForDutyShiftList(String appKey) {
return this.queryForList("" , false, appKey);
......
......@@ -527,7 +527,7 @@ public class ExcelController extends BaseController {
private String[] getDutyNameList() {
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()));
String[] dutyNameList = dutyShiftList.toArray(new String[dutyShiftList.size()]);
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