|
@@ -25,10 +25,12 @@ import com.jeeplus.test.mould.service.SerialnumTplService;
|
|
|
import com.jeeplus.test.oss.domain.WorkAttachment;
|
|
|
import com.jeeplus.test.oss.mapper.OssServiceMapper;
|
|
|
import com.jeeplus.test.workContract.service.dto.WorkAttachmentDto;
|
|
|
+import org.springframework.http.ResponseEntity;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
+import java.util.ArrayList;
|
|
|
import java.util.Date;
|
|
|
import java.util.List;
|
|
|
import java.util.UUID;
|
|
@@ -115,8 +117,14 @@ public class WareHouseBasicService {
|
|
|
});
|
|
|
}
|
|
|
//将采购详情数据查出
|
|
|
- MaterialBasic basic = materialBasicMapper.getInfoByPurchaseNo(info.getPurchaseNo());
|
|
|
- List<MaterialDetailed> detailedList = materialDetailedMapper.getByBasicId(basic.getId());
|
|
|
+ List<MaterialDetailed> detailedList = new ArrayList<>();
|
|
|
+ if (StringUtils.isNotEmpty(info.getPurchaseNo())) {
|
|
|
+ MaterialBasic basic = materialBasicMapper.getInfoByPurchaseNo(info.getPurchaseNo());
|
|
|
+ if (null != basic) {
|
|
|
+ detailedList = materialDetailedMapper.getByBasicId(basic.getId());
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
if (CollectionUtils.isNotEmpty(detailedList)){
|
|
|
detailedList.forEach(detailed->{
|
|
|
//附件信息
|
|
@@ -389,6 +397,9 @@ public class WareHouseBasicService {
|
|
|
if (StringUtils.isNotEmpty(dto.getHandledByOffice())) {
|
|
|
queryWrapper.like("a.handled_by_office", dto.getHandledByOffice());
|
|
|
}
|
|
|
+ if (StringUtils.isNotEmpty(dto.getStatus())) {
|
|
|
+ queryWrapper.like("a.status", dto.getStatus());
|
|
|
+ }
|
|
|
// 入库时间
|
|
|
String[] contractDates = dto.getWareHouseDates();
|
|
|
if (contractDates != null) {
|
|
@@ -420,6 +431,12 @@ public class WareHouseBasicService {
|
|
|
if (StringUtils.isNotEmpty(dto.getWareHouseManOffice())) {
|
|
|
queryWrapper.like("so.id", dto.getWareHouseManOffice());
|
|
|
}
|
|
|
+
|
|
|
+ //入库类型
|
|
|
+ if (StringUtils.isNotEmpty(dto.getWareHouseType())) {
|
|
|
+ queryWrapper.eq("d.name", dto.getWareHouseType());
|
|
|
+ }
|
|
|
+
|
|
|
// 入库时间
|
|
|
String[] contractDates = dto.getWareHouseDates();
|
|
|
if (contractDates != null) {
|
|
@@ -429,4 +446,16 @@ public class WareHouseBasicService {
|
|
|
|
|
|
return basicMapper.summaryList(page, queryWrapper);
|
|
|
}
|
|
|
+
|
|
|
+ public String findRequestId(String purchaseNo) {
|
|
|
+ return basicMapper.findRequestId(purchaseNo);
|
|
|
+ }
|
|
|
+
|
|
|
+ public String updateStatusById(WareHouseDto dto) {
|
|
|
+ WareHouseBasic wareHouseBasic = new WareHouseBasic();
|
|
|
+ BeanUtils.copyProperties(dto,wareHouseBasic);
|
|
|
+ basicMapper.update(wareHouseBasic, new QueryWrapper<WareHouseBasic>().lambda().eq(WareHouseBasic::getId, wareHouseBasic.getId()));
|
|
|
+ return "操作成功";
|
|
|
+ }
|
|
|
+
|
|
|
}
|