|
@@ -3,19 +3,27 @@ package com.java110.common.bmo.attendanceLog.impl;
|
|
|
import com.java110.common.bmo.attendanceLog.ISaveAttendanceLogBMO;
|
|
import com.java110.common.bmo.attendanceLog.ISaveAttendanceLogBMO;
|
|
|
import com.java110.core.annotation.Java110Transactional;
|
|
import com.java110.core.annotation.Java110Transactional;
|
|
|
import com.java110.core.factory.GenerateCodeFactory;
|
|
import com.java110.core.factory.GenerateCodeFactory;
|
|
|
|
|
+import com.java110.dto.store.StoreUserDto;
|
|
|
import com.java110.intf.common.IAttendanceLogInnerServiceSMO;
|
|
import com.java110.intf.common.IAttendanceLogInnerServiceSMO;
|
|
|
|
|
+import com.java110.intf.store.IStoreInnerServiceSMO;
|
|
|
import com.java110.po.attendanceLog.AttendanceLogPo;
|
|
import com.java110.po.attendanceLog.AttendanceLogPo;
|
|
|
|
|
+import com.java110.utils.util.Assert;
|
|
|
import com.java110.vo.ResultVo;
|
|
import com.java110.vo.ResultVo;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.http.ResponseEntity;
|
|
import org.springframework.http.ResponseEntity;
|
|
|
import org.springframework.stereotype.Service;
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
|
|
|
|
+import java.util.List;
|
|
|
|
|
+
|
|
|
@Service("saveAttendanceLogBMOImpl")
|
|
@Service("saveAttendanceLogBMOImpl")
|
|
|
public class SaveAttendanceLogBMOImpl implements ISaveAttendanceLogBMO {
|
|
public class SaveAttendanceLogBMOImpl implements ISaveAttendanceLogBMO {
|
|
|
|
|
|
|
|
@Autowired
|
|
@Autowired
|
|
|
private IAttendanceLogInnerServiceSMO attendanceLogInnerServiceSMOImpl;
|
|
private IAttendanceLogInnerServiceSMO attendanceLogInnerServiceSMOImpl;
|
|
|
|
|
|
|
|
|
|
+ @Autowired
|
|
|
|
|
+ private IStoreInnerServiceSMO storeInnerServiceSMOImpl;
|
|
|
|
|
+
|
|
|
/**
|
|
/**
|
|
|
* 添加小区信息
|
|
* 添加小区信息
|
|
|
*
|
|
*
|
|
@@ -25,7 +33,14 @@ public class SaveAttendanceLogBMOImpl implements ISaveAttendanceLogBMO {
|
|
|
@Java110Transactional
|
|
@Java110Transactional
|
|
|
public ResponseEntity<String> save(AttendanceLogPo attendanceLogPo) {
|
|
public ResponseEntity<String> save(AttendanceLogPo attendanceLogPo) {
|
|
|
|
|
|
|
|
|
|
+ StoreUserDto storeUserDto = new StoreUserDto();
|
|
|
|
|
+ storeUserDto.setUserId(attendanceLogPo.getStaffId());
|
|
|
|
|
+ List<StoreUserDto> storeUserDtos = storeInnerServiceSMOImpl.getStoreUserInfo(storeUserDto);
|
|
|
|
|
+
|
|
|
|
|
+ Assert.listOnlyOne(storeUserDtos, "未找到商户信息");
|
|
|
|
|
+
|
|
|
attendanceLogPo.setLogId(GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.CODE_PREFIX_logId));
|
|
attendanceLogPo.setLogId(GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.CODE_PREFIX_logId));
|
|
|
|
|
+ attendanceLogPo.setStoreId(storeUserDtos.get(0).getStoreId());
|
|
|
int flag = attendanceLogInnerServiceSMOImpl.saveAttendanceLog(attendanceLogPo);
|
|
int flag = attendanceLogInnerServiceSMOImpl.saveAttendanceLog(attendanceLogPo);
|
|
|
|
|
|
|
|
if (flag > 0) {
|
|
if (flag > 0) {
|