| | |
| | | import com.iailab.framework.common.pojo.PageResult; |
| | | import com.iailab.framework.common.service.impl.BaseServiceImpl; |
| | | import com.iailab.framework.common.util.object.BeanUtils; |
| | | import com.iailab.iems.common.utils.ConvertUtils; |
| | | import com.iailab.iems.common.utils.SerialNumUtils; |
| | | import com.iailab.framework.common.util.object.ConvertUtils; |
| | | import com.iailab.module.pms.coalquality.modules.detection.dao.QualityDetectionDao; |
| | | import com.iailab.module.pms.coalquality.modules.detection.dto.QualityDetectionDTO; |
| | | import com.iailab.module.pms.coalquality.modules.detection.entity.QualityDetectionEntity; |
| | | import com.iailab.module.pms.coalquality.modules.detection.service.QualityDetectionService; |
| | | import com.iailab.module.pms.coalquality.modules.detection.vo.DetectionPageReqVO; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.util.CollectionUtils; |
| | |
| | | @Service |
| | | public class QualityDetectionServiceImpl extends BaseServiceImpl<QualityDetectionDao, QualityDetectionEntity> |
| | | implements QualityDetectionService { |
| | | |
| | | @Autowired |
| | | private SerialNumUtils serialNumUtils; |
| | | |
| | | private Map<String, String> prefixMap = new HashMap<>(); |
| | | |
| | |
| | | prefixMap.put("spm", "30"); |
| | | } |
| | | QualityDetectionEntity entity = ConvertUtils.sourceToTarget(dto, QualityDetectionEntity.class); |
| | | entity.setCode(prefixMap.get(dto.getType()) + serialNumUtils.getByBusinessDate(BUSINESS_CODE + dto.getType(), dto.getRq(), 4)); |
| | | // entity.setCode(prefixMap.get(dto.getType()) + serialNumUtils.getByBusinessDate(BUSINESS_CODE + dto.getType(), dto.getRq(), 4)); |
| | | entity.setCreateDate(new Date()); |
| | | // entity.setCreator(SecurityUser.getUserId().toString()); |
| | | insert(entity); |