Merge branch 'dev_2.0.1' of http://git.unissense.tech/mula/fourcal into dev_2.0.1
commit
8a0eb01ae9
|
@ -1,6 +1,8 @@
|
|||
package cn.palmte.work.model;
|
||||
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.Table;
|
||||
|
||||
|
@ -9,7 +11,9 @@ import javax.persistence.Table;
|
|||
*/
|
||||
@Entity
|
||||
@Table(name = "project_budget_cost_detail_temp")
|
||||
@Data
|
||||
public class ProjectBudgetCostDetailTemp extends ProjectBudgetCostDetailBase{
|
||||
private String categoryStr;
|
||||
public ProjectBudgetCostDetail toProjectBudgetCostDetail(){
|
||||
ProjectBudgetCostDetail detail = new ProjectBudgetCostDetail();
|
||||
detail.setProjectId(getProjectId());
|
||||
|
|
|
@ -1282,6 +1282,7 @@ public class ProjectBudgetService {
|
|||
// }
|
||||
// projectBudgetCostDetailRepository.save(CostDetailList);
|
||||
final ResponseMsg msg = ResponseMsg.buildSuccessMsg(String.format("成功:%d, 失败:%d", successCount, errorCount));
|
||||
costDetailTempList.forEach(item->item.setCategory(item.getCategoryStr()));
|
||||
msg.setData(new HashMap<String,List>(){{put("errorList",errorList);put("successList",costDetailTempList);}});
|
||||
return msg;
|
||||
}
|
||||
|
@ -1296,7 +1297,7 @@ public class ProjectBudgetService {
|
|||
String type = (String) o1;
|
||||
if ("设备".equals(type)) {
|
||||
temp.setType(1);
|
||||
} else if ("施工".equals(type)) {
|
||||
} else if ("工程".equals(type)) {
|
||||
temp.setType(2);
|
||||
} else if ("服务".equals(type)) {
|
||||
temp.setType(3);
|
||||
|
@ -1311,6 +1312,7 @@ public class ProjectBudgetService {
|
|||
ProcurementType procurementType = procurementTypeRepository.findByName(category);
|
||||
if (procurementType != null && (procurementType.getType() == temp.getType() && temp.getType()!=4)) {
|
||||
temp.setCategory(procurementType.getId().toString());
|
||||
temp.setCategoryStr(category);
|
||||
} else {
|
||||
throw new Exception("该采购类别不存在或者与采购成本项目不匹配");
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue