| | |
| | | import com.core.common.R; |
| | | import com.core.domain.KeyValueVo; |
| | | import com.zy.crm.common.web.BaseController; |
| | | import com.zy.crm.manager.entity.Plan; |
| | | import com.zy.crm.manager.entity.Pri; |
| | | import com.zy.crm.manager.entity.PriOnline2; |
| | | import com.zy.crm.manager.service.PlanService; |
| | | import com.zy.crm.manager.service.PriOnline2Service; |
| | | import com.zy.crm.manager.service.PriService; |
| | | import com.zy.crm.manager.entity.*; |
| | | import com.zy.crm.manager.service.*; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.core.io.ClassPathResource; |
| | | import org.springframework.util.ClassUtils; |
| | |
| | | |
| | | @Autowired |
| | | private PlanService planService; |
| | | |
| | | @Autowired |
| | | private PriSalesService priSalesService; |
| | | |
| | | @Autowired |
| | | private CstmrService cstmrService; |
| | | |
| | | @RequestMapping(value = "/priOnline2/{id}/auth") |
| | | @ManagerAuth |
| | |
| | | PriOnline2 priOnline2 = new PriOnline2(); |
| | | priOnline2.setCreateTime(new Date()); |
| | | priOnline2.setTitle(map.get("title").toString()); |
| | | priOnline2.setTemplateName(map.get("title").toString()); |
| | | // priOnline2.setTemplateName(map.get("title").toString()); |
| | | priOnline2.setSheetData(map.get("sheetData").toString()); |
| | | priOnline2.setItemId(Long.parseLong(map.get("itemId").toString())); |
| | | SimpleDateFormat format = new SimpleDateFormat("yyyyMMddHHmmss"); |
| | |
| | | // Item item = itemService.selectById(priOnline.getItemId()); |
| | | Plan plan = planService.selectById(priOnline2.getItemId()); |
| | | priOnline2.setMemberId(plan.getUserId()); |
| | | |
| | | Cstmr cstmr = cstmrService.selectById(plan.getCstmrId()); |
| | | priOnline2.setTemplateName(cstmr.getName()); //甲方单位名称 |
| | | |
| | | |
| | | //设置项目流程 |
| | |
| | | if (Cools.isEmpty(ids)){ |
| | | return R.error(); |
| | | } |
| | | for (Long id : ids){ |
| | | int priSales = priSalesService.selectCount(new EntityWrapper<PriSales>().eq("pri_online2_id", id)); |
| | | if (priSales!=0){ |
| | | return R.error("存在关联的产品费用明细,禁止删除!!!"); |
| | | } |
| | | } |
| | | priOnline2Service.deleteBatchIds(Arrays.asList(ids)); |
| | | return R.ok(); |
| | | } |
| | |
| | | for (PriOnline2 priOnline2 : page.getRecords()){ |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("id", priOnline2.getId()); |
| | | map.put("value", priOnline2.getOrderNum() + "/" + priOnline2.getPlanId$() + "/" + priOnline2.getMemberId$()); |
| | | // map.put("value", priOnline2.getOrderNum() + "/" + priOnline2.getPlanId$() + "/" + priOnline2.getMemberId$()); |
| | | map.put("value", priOnline2.getOrderNum() + "/" + priOnline2.getTemplateName()); |
| | | result.add(map); |
| | | } |
| | | return R.ok(result); |