|
@@ -1,10 +1,13 @@
|
|
|
package com.lc.ibps.components.employee.provider;
|
|
package com.lc.ibps.components.employee.provider;
|
|
|
|
|
|
|
|
import java.util.ArrayList;
|
|
import java.util.ArrayList;
|
|
|
|
|
+import java.util.HashMap;
|
|
|
import java.util.List;
|
|
import java.util.List;
|
|
|
|
|
+import java.util.Map;
|
|
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
import javax.annotation.Resource;
|
|
|
|
|
|
|
|
|
|
+import com.lc.ibps.base.framework.id.UniqueIdUtil;
|
|
|
import org.springframework.stereotype.Service;
|
|
import org.springframework.stereotype.Service;
|
|
|
import org.springframework.web.bind.annotation.RequestBody;
|
|
import org.springframework.web.bind.annotation.RequestBody;
|
|
|
import org.springframework.web.bind.annotation.RequestParam;
|
|
import org.springframework.web.bind.annotation.RequestParam;
|
|
@@ -89,9 +92,18 @@ public class StaffScheduleProvider extends GenericProvider implements IStaffSche
|
|
|
@RequestBody(required = true) StaffSchedulePo staffSchedulePo) {
|
|
@RequestBody(required = true) StaffSchedulePo staffSchedulePo) {
|
|
|
APIResult<Void> result = new APIResult<Void>();
|
|
APIResult<Void> result = new APIResult<Void>();
|
|
|
try {
|
|
try {
|
|
|
|
|
+ Map<String, Object> variables = new HashMap<>();
|
|
|
|
|
+ if(BeanUtils.isEmpty(staffSchedulePo.getId())){
|
|
|
|
|
+ String id = UniqueIdUtil.getId();
|
|
|
|
|
+ staffSchedulePo.setId(id);
|
|
|
|
|
+ variables.put("id", id);
|
|
|
|
|
+ }else {
|
|
|
|
|
+ variables.put("id", staffSchedulePo.getId());
|
|
|
|
|
+ }
|
|
|
logger.info(" com.lc.ibps.components.provider.StaffScheduleProvider.save()--->staffSchedulePo: {}", staffSchedulePo.toString());
|
|
logger.info(" com.lc.ibps.components.provider.StaffScheduleProvider.save()--->staffSchedulePo: {}", staffSchedulePo.toString());
|
|
|
StaffSchedule domain = staffScheduleRepository.newInstance(staffSchedulePo);
|
|
StaffSchedule domain = staffScheduleRepository.newInstance(staffSchedulePo);
|
|
|
domain.saveCascade();
|
|
domain.saveCascade();
|
|
|
|
|
+ result.setVariables(variables);
|
|
|
result.setMessage("保存排班记录表成功");
|
|
result.setMessage("保存排班记录表成功");
|
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|
|
|
setExceptionResult(result, StateEnum.ERROR.getCode(), StateEnum.ERROR.getText(), e);
|
|
setExceptionResult(result, StateEnum.ERROR.getCode(), StateEnum.ERROR.getText(), e);
|