后台代码提交
This commit is contained in:
parent
f24cafc21e
commit
ce8e4d7133
|
|
@ -7,11 +7,13 @@ import com.bonus.sgzb.base.domain.RepairTaskDetails;
|
|||
import com.bonus.sgzb.base.domain.vo.dictVo;
|
||||
import com.bonus.sgzb.base.mapper.RepairMapper;
|
||||
import com.bonus.sgzb.base.service.RepairService;
|
||||
import com.bonus.sgzb.common.core.exception.ServiceException;
|
||||
import com.bonus.sgzb.common.core.web.domain.AjaxResult;
|
||||
import com.bonus.sgzb.common.security.service.TokenService;
|
||||
import com.bonus.sgzb.common.security.utils.SecurityUtils;
|
||||
import com.bonus.sgzb.system.api.domain.SysUser;
|
||||
import com.bonus.sgzb.system.api.model.LoginUser;
|
||||
import jdk.javadoc.internal.doclets.toolkit.taglets.ThrowsTaglet;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
|
@ -90,9 +92,12 @@ public class RepairServiceImpl implements RepairService {
|
|||
if (partList != null && partList.size()>0){
|
||||
for (RepairPartDetails partDetails : partList){
|
||||
if (partDetails.getPartId() == null && bean.getRepairType().equals("1")){
|
||||
return AjaxResult.error("请选择配件");
|
||||
throw new ServiceException("请选择配件");
|
||||
}
|
||||
if (bean.getRepairType().equals("1")){
|
||||
if (partDetails.getPartCost() == null || partDetails.getPartCost().isEmpty()){
|
||||
partDetails.setPartCost("0");
|
||||
}
|
||||
partDetails.setTaskId(bean.getTaskId());
|
||||
partDetails.setMaId(bean.getMaId());
|
||||
partDetails.setTypeId(bean.getTypeId());
|
||||
|
|
@ -106,7 +111,11 @@ public class RepairServiceImpl implements RepairService {
|
|||
bean.setPartType(partList.get(0).getPartType());
|
||||
bean.setRepairContent(partList.get(0).getRepairContent());
|
||||
bean.setSupplierId(partList.get(0).getSupplierId());
|
||||
if (bean.getPartPrice() == null || bean.getPartPrice().isEmpty()){
|
||||
bean.setPartPrice("0");
|
||||
}else {
|
||||
bean.setPartPrice(partList.get(0).getPartPrice());
|
||||
}
|
||||
bean.setPartNum(partList.get(0).getPartNum());
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue