@@ -813,4 +813,12 @@ public class FbsInventory implements Serializable {
//项目名称
@TableField(exist = false)
private String CostItemName;
+
+ /** 生产订单数量*/
+ @TableField(exist = false)
+ private String qty;
+ /** 行号 */
+ private String sortSeq;
}
@@ -3,7 +3,7 @@
<mapper namespace="org.jeecg.modules.fbsInventory.mapper.FbsInventoryMapper">
<select id="getInventoryGetByOrderId" resultType="org.jeecg.modules.fbsInventory.entity.FbsInventory" >
SELECT
- i.cInvCode as cinvcode,i.cInvName as cinvname,m.CostItemName
+ i.cInvCode as cinvcode,i.cInvName as cinvname,m.CostItemName,Convert(decimal(18,2),m.Qty) as qty,m.SortSeq as sortSeq
FROM
mom_orderdetail m
LEFT JOIN Inventory i ON m.InvCode = i.cInvCode
@@ -643,4 +643,24 @@ public class FbsWorkshopDispatchListController {
return result;
+ /**
+ * @Author chenchuang
+ * @Description //TODO 派工单后台批量新增
+ * @Date 2020/11/3 11:21
+ * @Param [fbsWorkshopDispatchList]
+ * @return org.jeecg.common.api.vo.Result<org.jeecg.modules.fbsWorkshopDispatchList.entity.FbsWorkshopDispatchList>
+ */
+ @PostMapping(value = "/workSaveBatch")
+ public Result<FbsWorkshopDispatchList> workSaveBatch(@RequestBody FbsWorkshopDispatchList fbsWorkshopDispatchList){
+ Result<FbsWorkshopDispatchList> result=new Result<>();
+ try {
+ fbsWorkshopDispatchListService.workSaveBatch(fbsWorkshopDispatchList);
+ result.success("操作成功");
+ } catch (Exception e) {
+ e.printStackTrace();
+ result.error500("操作失败:"+e.getMessage());
+ }
+ return result;
@@ -125,6 +125,9 @@ public class FbsWorkshopDispatchList implements Serializable {
private String projectName;
+ //行号
+ private String rowNumber;
//合并行
private Integer mergeLines;
@@ -127,4 +127,13 @@ public interface IFbsWorkshopDispatchListService extends IService<FbsWorkshopDis
* @return java.util.List<org.jeecg.modules.fbsWorkshopDispatchList.entity.FbsWorkshopDispatchList>
*/
List<FbsWorkshopDispatchList> getProjectScheduleCompletion();
+ * @Description //TODO 批量新增
+ * @Date 2020/11/3 11:12
+ * @return void
+ void workSaveBatch(FbsWorkshopDispatchList fbsWorkshopDispatchList);
@@ -378,5 +378,17 @@ public class FbsWorkshopDispatchListServiceImpl extends ServiceImpl<FbsWorkshopD
return fbsWorkshopDispatchListMapper.getProjectScheduleCompletion();
+ @Override
+ public void workSaveBatch(FbsWorkshopDispatchList fbsWorkshopDispatchList) {
+ if(fbsWorkshopDispatchList.getFbsWorkshopDispatchListList()!=null){
+ Integer sort=1;
+ for(FbsWorkshopDispatchList dispatchList:fbsWorkshopDispatchList.getFbsWorkshopDispatchListList()){
+ dispatchList.setSort(sort);
+ sort++;
+ iFbsWorkshopDispatchListService.saveBatch(fbsWorkshopDispatchList.getFbsWorkshopDispatchListList());