Browse Source

sap 其他入库的操作

master
Rui_Li 3 weeks ago
parent
commit
9b6a8806df
  1. 28
      src/main/java/com/gaotao/modules/finishedProduct/controller/CRollinfoController.java
  2. 3
      src/main/java/com/gaotao/modules/finishedProduct/service/impl/CRollinfoServiceImpl.java
  3. 6
      src/main/java/com/gaotao/modules/finishedProduct/service/impl/TransheaderServiceImpl.java

28
src/main/java/com/gaotao/modules/finishedProduct/controller/CRollinfoController.java

@ -5,6 +5,7 @@ import com.gaotao.common.exception.XJException;
import com.gaotao.common.utils.PageUtils; import com.gaotao.common.utils.PageUtils;
import com.gaotao.common.utils.R; import com.gaotao.common.utils.R;
import com.gaotao.modules.finishedProduct.entity.CRollinfoEntity; import com.gaotao.modules.finishedProduct.entity.CRollinfoEntity;
import com.gaotao.modules.finishedProduct.sap.service.SapRollService;
import com.gaotao.modules.finishedProduct.service.CRollinfoService; import com.gaotao.modules.finishedProduct.service.CRollinfoService;
import com.gaotao.modules.finishedProduct.vo.CRollInfoStorageVo; import com.gaotao.modules.finishedProduct.vo.CRollInfoStorageVo;
import com.gaotao.modules.finishedProduct.vo.CRollinfoVo; import com.gaotao.modules.finishedProduct.vo.CRollinfoVo;
@ -16,6 +17,7 @@ import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import java.util.List; import java.util.List;
import java.util.Map;
/** /**
@ -30,6 +32,9 @@ public class CRollinfoController extends AbstractController {
@Autowired @Autowired
private CRollinfoService cRollinfoService; private CRollinfoService cRollinfoService;
@Autowired
private SapRollService sapRollService;
/* /*
* @Author sxm * @Author sxm
@ -265,4 +270,27 @@ public class CRollinfoController extends AbstractController {
return R.ok(getLanguageMsg(SysMsgConstant.OBJECT_ID_200000)); return R.ok(getLanguageMsg(SysMsgConstant.OBJECT_ID_200000));
} }
// ==================== SAP成品出入库接口 ====================
@PostMapping("/sapOutRollno")
public R sapOutRollno(@RequestBody CRollinfoEntity rollno) {
return sapRollService.sapOutRollno(rollno);
}
@PostMapping("/sapRollToStorage")
public R sapRollToStorage(@RequestBody CRollInfoStorageVo cRollInfoStorageVo) {
return sapRollService.sapRollToStorage(cRollInfoStorageVo);
}
@PostMapping("/sapBatchRollOutbound")
public R sapBatchRollOutbound(@RequestBody List<CRollinfoEntity> cRollinfoList) {
return sapRollService.sapBatchRollOutbound(cRollinfoList);
}
@GetMapping("/sapUfdOptions")
public R sapUfdOptions(@RequestParam("type") String type) {
List<Map<String, Object>> options = sapRollService.getSapUfdOptions(type);
return R.ok().put("options", options);
}
} }

3
src/main/java/com/gaotao/modules/finishedProduct/service/impl/CRollinfoServiceImpl.java

@ -808,7 +808,8 @@ public class CRollinfoServiceImpl extends ServiceImpl<CRollinfoDao, CRollinfoEnt
CRollinfoEntity cRollInfo = lambdaQuery() CRollinfoEntity cRollInfo = lambdaQuery()
.eq(StringUtils.isNotEmpty(rollno.getRollno()), CRollinfoEntity::getRollno, rollno.getRollno()) .eq(StringUtils.isNotEmpty(rollno.getRollno()), CRollinfoEntity::getRollno, rollno.getRollno())
.eq(StringUtils.isNotEmpty(rollno.getStatusDb()), CRollinfoEntity::getStatusDb, rollno.getStatusDb()) .eq(StringUtils.isNotEmpty(rollno.getStatusDb()), CRollinfoEntity::getStatusDb, rollno.getStatusDb())
.eq(StringUtils.isNotEmpty(rollno.getSite()), CRollinfoEntity::getSite, rollno.getSite()).one();
.eq(StringUtils.isNotEmpty(rollno.getSite()), CRollinfoEntity::getSite, rollno.getSite())
.and(w -> w.ne(CRollinfoEntity::getSourcetype, "SAP成品入库").or().isNull(CRollinfoEntity::getSourcetype)).one();
if (cRollInfo == null) { if (cRollInfo == null) {
return R.error(sysMsgService.getLanguageMsg(SysMsgConstant.OBJECT_ID_200105)); return R.error(sysMsgService.getLanguageMsg(SysMsgConstant.OBJECT_ID_200105));
} }

6
src/main/java/com/gaotao/modules/finishedProduct/service/impl/TransheaderServiceImpl.java

@ -64,6 +64,12 @@ public class TransheaderServiceImpl extends ServiceImpl<TransheaderDao, Transhea
case "CRR": case "CRR":
remark = "采购退货"; remark = "采购退货";
break; break;
case "SOI":
remark = "SAP成品入库";
break;
case "SOC":
remark = "SAP成品出库";
break;
} }
herder.setRemark(remark); herder.setRemark(remark);
this.save(herder); this.save(herder);

Loading…
Cancel
Save