|
|
|
@ -46,6 +46,7 @@ import dubbo.service.OpenErpService;
|
|
|
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
|
|
import org.apache.dubbo.config.annotation.DubboReference; |
|
|
|
|
import org.springframework.stereotype.Service; |
|
|
|
|
import org.springframework.transaction.annotation.Transactional; |
|
|
|
|
import org.springframework.validation.annotation.Validated; |
|
|
|
|
|
|
|
|
|
import javax.annotation.Resource; |
|
|
|
@ -95,6 +96,7 @@ public class DiscussServiceImpl implements DiscussService {
|
|
|
|
|
private OpenErpService openErpService; |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
@Transactional(rollbackFor = Exception.class) |
|
|
|
|
public Long createDiscuss(DiscussCreateReqVO createReqVO) { |
|
|
|
|
//只有所属任务进行中才可以添加活动
|
|
|
|
|
this.canDiscussCreated(BeanUtil.copyProperties(createReqVO, DiscussDO.class)); |
|
|
|
@ -120,7 +122,7 @@ public class DiscussServiceImpl implements DiscussService {
|
|
|
|
|
// 校验存在
|
|
|
|
|
this.validateDiscussExists(updateReqVO.getId()); |
|
|
|
|
//只有所属任务进行中才可以修改活动
|
|
|
|
|
this.canDiscussCreated(BeanUtil.copyProperties(updateReqVO, DiscussDO.class)); |
|
|
|
|
// this.canDiscussCreated(BeanUtil.copyProperties(updateReqVO, DiscussDO.class));
|
|
|
|
|
// 更新
|
|
|
|
|
DiscussDO updateObj = DiscussConvert.INSTANCE.convert(updateReqVO); |
|
|
|
|
discussMapper.updateById(updateObj); |
|
|
|
@ -217,8 +219,8 @@ public class DiscussServiceImpl implements DiscussService {
|
|
|
|
|
} |
|
|
|
|
discussDTO.setWorkList(workUserMsgList); |
|
|
|
|
|
|
|
|
|
List<String> areaNameList = areaService.findAreaName(areaList, discussDTO.getAreas()); |
|
|
|
|
discussDTO.setAreaNameList(areaNameList); |
|
|
|
|
// List<String> areaNameList = areaService.findAreaName(areaList, discussDTO.getAreas());
|
|
|
|
|
// discussDTO.setAreaNameList(areaNameList);
|
|
|
|
|
} |
|
|
|
|
PageVO<DiscussDTO> returnList = PageUtil.convertPageInfo(discussDTOList); |
|
|
|
|
return R.success(returnList); |
|
|
|
@ -292,8 +294,8 @@ public class DiscussServiceImpl implements DiscussService {
|
|
|
|
|
CropRecordDO cropRecordDO = CropRecordDO.builder() |
|
|
|
|
.cropId(taskDO.getCropId()) |
|
|
|
|
.type(true) |
|
|
|
|
.stock(reqVO.getCropNum().intValue()) |
|
|
|
|
.afterStock(reqVO.getCropNum().intValue() + afterStock) |
|
|
|
|
.stock(reqVO.getRecoveryNumber().intValue()) |
|
|
|
|
.afterStock(reqVO.getRecoveryNumber().intValue() + afterStock) |
|
|
|
|
.build(); |
|
|
|
|
cropRecordMapper.insert(cropRecordDO); |
|
|
|
|
|
|
|
|
@ -303,12 +305,10 @@ public class DiscussServiceImpl implements DiscussService {
|
|
|
|
|
.wareHouseId("1546738475384201217") |
|
|
|
|
.price(BigDecimal.ZERO) |
|
|
|
|
.materialId(cropDO.getMaterialId().toString()) |
|
|
|
|
.num(new BigDecimal(reqVO.getCropNum())) |
|
|
|
|
.num(new BigDecimal(reqVO.getRecoveryNumber())) |
|
|
|
|
.build(); |
|
|
|
|
log.info("同步到ERP,,{}", intoStock); |
|
|
|
|
openErpService.intoStock(Arrays.asList(intoStock) ); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
@ -322,8 +322,7 @@ public class DiscussServiceImpl implements DiscussService {
|
|
|
|
|
taskMapper.updateById(taskDO); |
|
|
|
|
|
|
|
|
|
//返还资源
|
|
|
|
|
taskService.checkTaskResourceNumber(taskDO); |
|
|
|
|
|
|
|
|
|
// taskService.checkTaskResourceNumber(taskDO);
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|