| | |
| | | package com.zy.asrs.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import com.core.common.Cools; |
| | | import com.core.exception.CoolException; |
| | | import com.zy.asrs.mapper.DocTypeMapper; |
| | | import com.zy.asrs.entity.DocType; |
| | | import com.zy.asrs.mapper.DocTypeMapper; |
| | | import com.zy.asrs.service.DocTypeService; |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.Date; |
| | |
| | | public class DocTypeServiceImpl extends ServiceImpl<DocTypeMapper, DocType> implements DocTypeService { |
| | | |
| | | @Override |
| | | public DocType selectOrAdd(String docName) { |
| | | public DocType selectOrAdd(String docName, Boolean pakin) { |
| | | if (Cools.isEmpty(docName)) { |
| | | return null; |
| | | } |
| | |
| | | docType = new DocType(); |
| | | docType.setDocId(docId); |
| | | docType.setDocName(docName); |
| | | if (null != pakin) { |
| | | docType.setPakin(pakin ? 1 : 0); |
| | | docType.setPakout(pakin ? 0 : 1); |
| | | } |
| | | docType.setStatus(1); |
| | | docType.setCreateTime(new Date()); |
| | | docType.setUpdateTime(new Date()); |