| | |
| | | package com.zy.asrs.controller; |
| | | |
| | | import com.core.annotations.ManagerAuth; |
| | | import com.core.common.Cools; |
| | | import com.core.common.R; |
| | | import com.zy.asrs.entity.MatCode; |
| | | import com.zy.asrs.service.MatCodeService; |
| | | import com.zy.common.service.erp.ErpService; |
| | | import com.zy.common.service.erp.entity.CPICMO; |
| | | import com.zy.common.web.BaseController; |
| | |
| | | public class ERPrelevantController extends BaseController { |
| | | @Autowired |
| | | private ErpService erpService; |
| | | @Autowired |
| | | private MatCodeService matCodeService; |
| | | |
| | | @RequestMapping(value = "/erp/cpicmo/query") |
| | | @ManagerAuth |
| | | public R add(String fbillNo, String fsourceBillNo) { |
| | | List<CPICMO> erpCPICMOlist = erpService.queryErpCPICMO(fbillNo, fsourceBillNo); |
| | | if (erpCPICMOlist.size() > 0) { |
| | | for (CPICMO erpList : erpCPICMOlist) { |
| | | MatCode matCodeObj = matCodeService.selectById(erpList.getFnumber()); |
| | | if (!Cools.isEmpty(matCodeObj)) { |
| | | erpList.setFname(matCodeObj.getMatName()); |
| | | } |
| | | } |
| | | } |
| | | return R.ok().add(erpCPICMOlist); |
| | | } |
| | | } |