chenlu
2024-09-24 edc227277159601c5cb86829f1c5ce14cf7903a4
Merge branch 'master' of http://10.153.19.25:10101/r/ERP_override
15个文件已修改
223 ■■■■ 已修改文件
north-glass-erp/northglass-erp/src/lang/en.js 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/lang/ru.js 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/lang/zh.js 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/views/pp/processCard/PrintCustomLabelSemi1.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/views/pp/processCard/PrintCustomLabelSemi2.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/views/pp/processCard/PrintLabel.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/views/pp/workOrder/AddWorkOrder.vue 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/views/pp/workOrder/SelectWorkOrder.vue 59 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/java/com/example/erp/service/mm/FinishedGoodsInventoryService.java 52 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/java/com/example/erp/service/mm/MaterialInventoryService.java 41 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/java/com/example/erp/service/mm/MaterialStoreService.java 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/java/com/example/erp/service/pp/WorkOrderService.java 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/java/com/example/erp/service/sd/CustomerService.java 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/java/com/example/erp/service/sd/DeliveryService.java 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/resources/mapper/pp/WordOrder.xml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/lang/en.js
@@ -335,6 +335,7 @@
        transferOrder:'Transfer Order',
        perimeter:'perimeter',
        deleteNo:'Delete failed Check whether the shelf has been splited',
        msg:'Please select all data'
    },
    processCard:{
north-glass-erp/northglass-erp/src/lang/ru.js
@@ -331,6 +331,7 @@
        transferOrder:'Трансферный ордер',
        perimeter:'Внешний край',
        deleteNo:'Удаление неудачных проверок, чтобы проверить, разделены ли они',
        msg:'Пожалуйста, выберите все данные'
    },
    processCard:{
north-glass-erp/northglass-erp/src/lang/zh.js
@@ -335,7 +335,8 @@
        deleteOk:'删除成功',
        transferOrder:'转工单',
        perimeter:'周长',
        deleteNo:'删除失败,检查是否已分架'
        deleteNo:'删除失败,检查是否已分架',
        msg:'请选择所有数据'
    },
    processCard:{
north-glass-erp/northglass-erp/src/views/pp/processCard/PrintCustomLabelSemi1.vue
@@ -161,7 +161,7 @@
  height: 35px;
}
.row1 span {
  font-size: 14pt;
  font-size: 15pt;
}
.row2 {
north-glass-erp/northglass-erp/src/views/pp/processCard/PrintCustomLabelSemi2.vue
@@ -163,7 +163,7 @@
  height: 35px;
}
.row1 span {
  font-size: 14pt;
  font-size: 15pt;
}
.row2 {
  font-size: 12pt;
north-glass-erp/northglass-erp/src/views/pp/processCard/PrintLabel.vue
@@ -193,7 +193,7 @@
  height: 20px;
}
.row1 span {
  font-size: 8pt;
  font-size: 10pt;
  font-weight: bold;
}
north-glass-erp/northglass-erp/src/views/pp/workOrder/AddWorkOrder.vue
@@ -26,10 +26,6 @@
      router.push({path: '/main/workOrder/addWorkOrder', query: {id: row.id}})
      break
    }
    case 'delete': {
      alert('我接收到子组件传送的删除信息')
      break
    }
  }
}
@@ -71,6 +67,7 @@
const {currentRoute} = useRouter()
const route = currentRoute.value
onMounted(() => {
let id = route.query.orderId
request.post(`/workOrder/addWork/${id}`, filterData.value).then((res) => {
@@ -84,6 +81,9 @@
    ElMessage.warning(res.msg)
  }
})
})
/*使用筛选,后端获取数据*/
@@ -216,6 +216,10 @@
          const $table = xGrid.value
          if ($table) {
            const selectRecords = $table.getCheckboxRecords()
            if(selectRecords.length!=$table.getTableData().fullData.length){
              ElMessage.warning(t('workOrder.msg'))
              return;
            }
            let workOrderData = ref({
              orderdetail: selectRecords,
@@ -225,7 +229,7 @@
            request.post("/workOrder/addOrderWork", workOrderData.value).then((res) => {
              if (res.code == 200 && res.data===true) {
                ElMessage.success(t('basicData.msg.saveSuccess'))
                router.push({path: '/main/workOrder/addWorkOrder', query: {orderId:id,random:Math.random()}})
                router.push({path: '/main/workOrder/addWorkOrder', query: {orderId:route.query.orderId,random:Math.random()}})
              } else {
                ElMessage.warning(res.msg)
              }
north-glass-erp/northglass-erp/src/views/pp/workOrder/SelectWorkOrder.vue
@@ -26,7 +26,6 @@
const getTableRow = (row, type) => {
  switch (type) {
    case 'edit' : {
      //alert('我接收到子组件传送的编辑信息')
      router.push({path: '/main/workOrder/addWorkOrder', query: {orderId: row.orderId}})
      break
    }
@@ -152,7 +151,7 @@
//点击查询
const getWorkOrder = (isButtonDisabled) => {
const getWorkOrder = () => {
  let startTime = orderInfo.workOrderDate[0]
  let endTime = orderInfo.workOrderDate[1]
@@ -247,8 +246,15 @@
    mode: 'row',
    showStatus: true
  },//表头参数
  checkboxConfig: {
    labelField: 'name',
    checkMethod: ({ row }) => {
      return optionVal.value === '1'
    }
  },
  columns: [
    {type: 'expand', fixed: "left", slots: {content: 'content'}, width: 50},
    {type: 'checkbox', fixed: "left", title: t('basicData.check'), width: 80},
    {title: t('basicData.operate'), width: 110, slots: {default: 'button_slot'}, fixed: "left"},
    {type: 'seq', fixed: "left", title: t('basicData.Number'), width: 50},
    {field: 'orderId', title: t('order.orderId'), filters: [{data: ''}], slots: {filter: 'num1_filter'}, width: 110},
@@ -272,9 +278,9 @@
  ],//表头按钮
  data: null,//表格数据
  toolbarConfig: {
    // buttons: [{
    //
    // }],
    buttons: [
      {'code': 'transferOrder', 'name': t('workOrder.transferOrder'),status: 'primary'}
    ],
    // import: false,
    // export: true,
    // print: true,
@@ -298,6 +304,23 @@
  }
})
const gridEvents = {
  async toolbarButtonClick({code}) {
    const $grid = xGrid.value
    if ($grid) {
      switch (code) {
        case 'transferOrder':  {
          const idList = []
           $grid.getCheckboxRecords().forEach(item => {
             idList.push(item.orderId)
          })
          router.push({path: '/main/workOrder/addWorkOrder', query: {orderId:idList.join(',')}})
          break
        }
      }
    }
  }
}
onMounted(() => {
  getFirst()
@@ -319,7 +342,12 @@
        />
          
        <el-select :default-first-option="true" ref="getSelect" style="width: 130px" v-model="optionVal" class="m-2"
        <el-select
            :default-first-option="true"
            ref="getSelect" style="width: 130px"
            v-model="optionVal"
            class="m-2"
            @change="getWorkOrder"
                   >
          <el-option
              v-for="item in options"
@@ -330,7 +358,7 @@
        </el-select>
        &nbsp;&nbsp;
        <el-button
            @click="getWorkOrder(isButtonDisabled)"
            @click="getWorkOrder"
            :disabled="isButtonDisabled"
            id="select"
            type="primary" :icon="Search">{{$t('basicData.search')}}
@@ -344,6 +372,7 @@
        class="mytable-scrollbar"
        ref="xGrid"
        v-bind="gridOptions"
        v-on="gridEvents"
    >
      <!--      @toolbar-button-click="toolbarButtonClickEvent"-->
@@ -362,14 +391,14 @@
      <!--左边固定显示的插槽-->
      <template #button_slot="{ row }">
<!--        <el-button :class="{disable: optionVal== 0}" :disabled="optionVal == 0" @click="getTableRow(row,'edit')" link type="primary" size="small">{{$t('workOrder.transferOrder')}}</el-button>-->
        <el-button :class="{disable: optionVal== 0}" :disabled="optionVal == 0"
                   @click="getTableRow(row,'edit')"
                   v-if="userStore.user.permissions.indexOf('SelectWorkOrder.edit') > -1"
                   link
                   type="primary"
                   size="small">
          {{$t('workOrder.transferOrder')}}
        </el-button>
<!--        <el-button :class="{disable: optionVal== 0}" :disabled="optionVal == 0"-->
<!--                   @click="getTableRow(row,'edit')"-->
<!--                   v-if="userStore.user.permissions.indexOf('SelectWorkOrder.edit') > -1"-->
<!--                   link-->
<!--                   type="primary"-->
<!--                   size="small">-->
<!--          {{$t('workOrder.transferOrder')}}-->
<!--        </el-button>-->
        <!--        <el-button :class="{disable: optionVal== 1}" :disabled="optionVal == 1" @click="getTableRow(row,'delete')" link type="primary" size="small">{{$t('basicData.delete')}}</el-button>-->
        <el-popconfirm   @confirm="getTableRow(row,'delete')" :title="$t('searchOrder.deleteConfirm')">
north-glass-erp/src/main/java/com/example/erp/service/mm/FinishedGoodsInventoryService.java
@@ -10,12 +10,14 @@
import com.example.erp.entity.pp.FlowCard;
import com.example.erp.entity.sd.Order;
import com.example.erp.entity.sd.OrderDetail;
import com.example.erp.entity.userInfo.Log;
import com.example.erp.entity.userInfo.SysError;
import com.example.erp.mapper.mm.BasicWarehouseTypeMapper;
import com.example.erp.mapper.mm.FinishedGoodsInventoryMapper;
import com.example.erp.mapper.mm.FinishedOperateLogMapper;
import com.example.erp.mapper.sd.OrderDetailMapper;
import com.example.erp.mapper.sd.OrderMapper;
import com.example.erp.service.userInfo.LogService;
import com.example.erp.service.userInfo.SysErrorService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@@ -44,6 +46,8 @@
    OrderMapper orderMapper;
    @Autowired
    SysErrorService sysErrorService;
    @Autowired
    LogService logService;
    public Map<String, Object> defaultDateFinishedGoodsInventory(Integer pageNum, Integer pageSize, FinishedGoodsInventory finishedGoodsInventory) {
        Integer offset = (pageNum - 1) * pageSize;
@@ -88,6 +92,12 @@
            if (object.get("userId") != null) {
                userId = object.get("userId").toString();
            }
            Log log = new Log();
            log.setOperator(userName);
            log.setOperatorId(userId);
            log.setContent(object.toString());
            log.setFunction("addSelectWarehousing入库");
            logService.saveLog(log);
            //获取对象集合循环进行新增修改
            List<FlowCard> flowCardlist = JSONArray.parseArray(JSONObject.toJSONString(object.get("flowCard")), FlowCard.class);
@@ -176,6 +186,12 @@
            if (object.get("userId") != null) {
                userId = object.get("userId").toString();
            }
            Log log = new Log();
            log.setOperator(userName);
            log.setOperatorId(userId);
            log.setContent(object.toString());
            log.setFunction("addDeliveryDetail出库");
            logService.saveLog(log);
            //获取对象集合循环进行新增修改
            List<OrderDetail> orderDetaillist = JSONArray.parseArray(JSONObject.toJSONString(object.get("orderDetail")), OrderDetail.class);
            if (!orderDetaillist.isEmpty()){
@@ -267,6 +283,12 @@
            if (object.get("userId") != null) {
                userId = object.get("userId").toString();
            }
            Log log = new Log();
            log.setOperator(userName);
            log.setOperatorId(userId);
            log.setContent(object.toString());
            log.setFunction("updateFinishedGoodsInventoryAllocate调拨");
            logService.saveLog(log);
            //获取对象集合循环进行新增修改
            List<OrderDetail> orderDetaillist = JSONArray.parseArray(JSONObject.toJSONString(object.get("orderDetail")), OrderDetail.class);
            if (!orderDetaillist.isEmpty()){
@@ -361,6 +383,12 @@
            if (object.get("operateType") != null) {
                operateType = object.get("operateType").toString();
            }
            Log log = new Log();
            log.setOperator(userName);
            log.setOperatorId(userId);
            log.setContent(object.toString());
            log.setFunction("updateFinishedGoodsInventoryTakeOut领出");
            logService.saveLog(log);
            //获取对象集合循环进行新增修改
            List<OrderDetail> orderDetaillist = JSONArray.parseArray(JSONObject.toJSONString(object.get("orderDetail")), OrderDetail.class);
            if (!orderDetaillist.isEmpty()){
@@ -494,6 +522,10 @@
            if (object.get("userId") != null) {
                userId = object.get("userId").toString();
            }
            Log log = new Log();
            log.setOperator(userName);
            log.setOperatorId(userId);
            log.setContent(object.toString());
            //获取对象集合循环进行新增修改
            List<FinishedOperateLog> finishedOperateLogslist = JSONArray.parseArray(JSONObject.toJSONString(object.get("orderDetail")), FinishedOperateLog.class);
            if (!finishedOperateLogslist.isEmpty()){
@@ -503,15 +535,18 @@
                        finishedOperateLogMapper.updateToExamine(finishedOperateLog,userName,"已审核");
                        //审核修改库存数量
                        finishedGoodsInventoryMapper.updateInventoryInventoryOut(finishedOperateLog.getOrderId(),finishedOperateLog.getOperationNumber(),Math.toIntExact(finishedOperateLog.getQuantity()));
                        log.setFunction("updateFinishedGoodsInventoryToExamine审核");
                    } else if (Objects.equals(type, "反审")) {
                        //审核修改领出记录
                        finishedOperateLogMapper.updateToExamine(finishedOperateLog,userName,"未审核");
                        //审核修改库存数量
                        finishedGoodsInventoryMapper.updateInventoryInventoryInt(finishedOperateLog.getOrderId(),finishedOperateLog.getOperationNumber(),Math.toIntExact(finishedOperateLog.getQuantity()));
                        log.setFunction("updateFinishedGoodsInventoryToExamine反审");
                    }
                }
            }
            logService.saveLog(log);
        } catch (Exception e) {
            TransactionAspectSupport.currentTransactionStatus().rollbackToSavepoint(savePoint);
@@ -540,6 +575,12 @@
            if (object.get("userId") != null) {
                userId = object.get("userId").toString();
            }
            Log log = new Log();
            log.setOperator(userName);
            log.setOperatorId(userId);
            log.setContent(object.toString());
            log.setFunction("cancelFinishedGoodsInventoryToExamine作废");
            logService.saveLog(log);
            //获取对象集合循环进行新增修改
            List<FinishedOperateLog> finishedOperateLogslist = JSONArray.parseArray(JSONObject.toJSONString(object.get("orderDetail")), FinishedOperateLog.class);
            if (!finishedOperateLogslist.isEmpty()){
@@ -618,7 +659,8 @@
        //设置回滚点
        Object savePoint = TransactionAspectSupport.currentTransactionStatus().createSavepoint();
        try {
            Log log = new Log();
            log.setContent(object.toString());
            //获取对象集合循环进行新增修改
            List<FinishedOperateLog> finishedOperateLogslist = JSONArray.parseArray(JSONObject.toJSONString(object.get("orderDetail")), FinishedOperateLog.class);
            if (!finishedOperateLogslist.isEmpty()){
@@ -649,6 +691,7 @@
                            //修改订单表入库状态
                            finishedGoodsInventoryMapper.updateOrderWarehousingState(finishedOperateLog.getOrderId(),0);
                        }
                        log.setFunction("cancelFinishedGoodsInventoryStorage入库");
                    }else if(Objects.equals(finishedOperateLog.getOperateType(), "出库")){
                        //修改记录表
@@ -673,11 +716,13 @@
                            //修改发货表状态
                            finishedGoodsInventoryMapper.updateDeliveryDeliveryState(finishedOperateLog.getOperationOrderNumber(),0);
                        }
                        log.setFunction("cancelFinishedGoodsInventoryStorage出库");
                    }
                }
            }
            logService.saveLog(log);
        } catch (Exception e) {
            TransactionAspectSupport.currentTransactionStatus().rollbackToSavepoint(savePoint);
@@ -701,6 +746,11 @@
    public Boolean oneClickStorage(String  orderId,String  userName) {
        boolean saveState = true;
        Object savePoint = TransactionAspectSupport.currentTransactionStatus().createSavepoint();
        Log log = new Log();
        log.setContent(orderId);
        log.setOperator(userName);
        log.setFunction("oneClickStorage入库:"+orderId);
        logService.saveLog(log);
        try {
            String oddNumber= orderNumberSetting("入库");
            Order order = orderMapper.selectOne(new QueryWrapper<Order>().eq("order_id",orderId));
north-glass-erp/src/main/java/com/example/erp/service/mm/MaterialInventoryService.java
@@ -10,10 +10,12 @@
import com.example.erp.entity.sd.Delivery;
import com.example.erp.entity.sd.DeliveryDetail;
import com.example.erp.entity.sd.OrderDetail;
import com.example.erp.entity.userInfo.Log;
import com.example.erp.entity.userInfo.SysError;
import com.example.erp.mapper.mm.BasicWarehouseTypeMapper;
import com.example.erp.mapper.mm.MaterialInventoryMapper;
import com.example.erp.mapper.mm.MaterialStoreMapper;
import com.example.erp.service.userInfo.LogService;
import com.example.erp.service.userInfo.SysErrorService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@@ -40,6 +42,8 @@
    BasicWarehouseTypeMapper basicWarehouseTypeMapper;
    @Autowired
    SysErrorService sysErrorService;
    @Autowired
    LogService logService;
    public Boolean saveMaterialOutbound(Map<String,Object> object) {
        boolean saveState = true;
@@ -50,6 +54,8 @@
        if (object.get("materialOutboundId") != null) {
            materialOutboundId = object.get("materialOutboundId").toString();
        }
        Log log = new Log();
        log.setContent(object.toString());
        try {
            MaterialOutbound materialOutbound = JSONObject.parseObject(JSONObject.toJSONString(object.get("title")), MaterialOutbound.class);
            List<MaterialOutboundDetail> materialOutboundDetailList = JSONArray.parseArray(JSONObject.toJSONString(object.get("materialOutboundDetail")), MaterialOutboundDetail.class);
@@ -76,11 +82,13 @@
                materialInventoryMapper.deleteMaterialOutboundDetail(materialOutboundId);
                materialInventoryMapper.updateMaterialOutbound(materialOutbound, materialOutboundId);
                oddNumber = materialOutboundId;
                log.setFunction("saveMaterialOutbound修改:"+oddNumber);
            } else {
                //获取单号
                oddNumber = orderNumberSetting("出库");
                //新增材料出库表数据
                materialInventoryMapper.insertMaterialOutbound(materialOutbound, oddNumber);
                log.setFunction("saveMaterialOutbound新增:"+oddNumber);
            }
            //获取对象集合循环进行新增修改
@@ -105,6 +113,7 @@
                }
            }
            logService.saveLog(log);
        } catch (Exception e) {
            TransactionAspectSupport.currentTransactionStatus().rollbackToSavepoint(savePoint);
@@ -137,6 +146,8 @@
            if (object.get("materialCode") != null) {
                materialCode = Long.valueOf(object.get("materialCode").toString());
            }
            Log log = new Log();
            log.setContent(object.toString());
            MaterialInventory materialInventory = JSONObject.parseObject(JSONObject.toJSONString(object.get("title")), MaterialInventory.class);
@@ -145,9 +156,12 @@
            if(MaterialInventoryCount>0){
                materialInventoryMapper.updateMaterialInventory(materialCode,singlePieceArea,totalArea,materialInventory);
                log.setFunction("saveMaterialInventory修改");
            }else {
                materialInventoryMapper.insertMaterialInventory(materialCode,singlePieceArea,totalArea,materialInventory);
                log.setFunction("saveMaterialInventory新增");
            }
            logService.saveLog(log);
        } catch (Exception e) {
            TransactionAspectSupport.currentTransactionStatus().rollbackToSavepoint(savePoint);
            //将异常传入数据库
@@ -246,7 +260,10 @@
                materialInventoryMapper.deleteMaterialOutboundDetail(materialOutboundId);
                materialInventoryMapper.deleteMaterialOutbound(materialOutboundId);
            }
            Log log = new Log();
            log.setContent(object.toString());
            log.setFunction("deleteMaterialOutbound删除:"+materialOutboundId);
            logService.saveLog(log);
        } catch (Exception e) {
@@ -322,6 +339,11 @@
            if (object.get("reviewed") != null) {
                reviewed = object.get("reviewed").toString();
            }
            Log log = new Log();
            log.setOperator(reviewed);
            log.setContent(object.toString());
            log.setFunction("updateMaterialOutboundToExamine:"+type);
            logService.saveLog(log);
            if (type==1){
                List<MaterialOutboundDetail> materialOutboundDetailList = materialInventoryMapper.getIsNotMaterialOutboundDetail(materialOutboundId);
@@ -375,6 +397,9 @@
            if (object.get("returningId") != null) {
                returningId = object.get("returningId").toString();
            }
            Log log = new Log();
            log.setContent(object.toString());
            ReturningWarehouse returningWarehouse = JSONObject.parseObject(JSONObject.toJSONString(object.get("title")), ReturningWarehouse.class);
            List<ReturningWarehouseDetail> returningWarehouseDetailList = JSONArray.parseArray(JSONObject.toJSONString(object.get("returningWarehouseDetail")), ReturningWarehouseDetail.class);
            //查询出库单是否存在
@@ -391,11 +416,13 @@
                //删除材料出库明细的数据
                materialInventoryMapper.deleteReturningWarehouseDetail(returningId);
                oddNumber = returningId;
                log.setFunction("saveReturningWarehouse修改:"+oddNumber);
            } else {
                //获取单号
                oddNumber = orderNumberSetting("返库");
                //新增材料出库表数据
                materialInventoryMapper.insertReturningWarehouse(returningWarehouse, oddNumber);
                log.setFunction("saveReturningWarehouse新增:"+oddNumber);
            }
@@ -455,6 +482,7 @@
                }
            }
            logService.saveLog(log);
        } catch (Exception e) {
            TransactionAspectSupport.currentTransactionStatus().rollbackToSavepoint(savePoint);
@@ -499,6 +527,11 @@
            if (object.get("reviewed") != null) {
                reviewed = object.get("reviewed").toString();
            }
            Log log = new Log();
            log.setOperator(reviewed);
            log.setContent(object.toString());
            log.setFunction("updateReturningWarehouseToExamine:"+type);
            logService.saveLog(log);
            if (type==1){
                List<ReturningWarehouseDetail> returningWarehouseDetailList = materialInventoryMapper.getIsNotReturningWarehouseDetail(returningId);
@@ -598,7 +631,11 @@
            if (object.get("state") != null) {
                state = Integer.parseInt(object.get("state").toString());
            }
        Log log = new Log();
        log.setOperator(creator);
        log.setContent(object.toString());
        log.setFunction("addSelectSurplusMaterialsDate:"+state);
        logService.saveLog(log);
            if(state==1){
                SurplusMaterials surplusMaterials = JSONObject.parseObject(JSONObject.toJSONString(object.get("surplusMaterials")), SurplusMaterials.class);
north-glass-erp/src/main/java/com/example/erp/service/mm/MaterialStoreService.java
@@ -2,10 +2,12 @@
import com.baomidou.dynamic.datasource.annotation.DS;
import com.example.erp.entity.mm.MaterialStore;
import com.example.erp.entity.userInfo.Log;
import com.example.erp.entity.userInfo.SysError;
import com.example.erp.mapper.mm.BasicWarehouseTypeMapper;
import com.example.erp.mapper.mm.MaterialInventoryMapper;
import com.example.erp.mapper.mm.MaterialStoreMapper;
import com.example.erp.service.userInfo.LogService;
import com.example.erp.service.userInfo.SysErrorService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@@ -27,6 +29,8 @@
    BasicWarehouseTypeMapper basicWarehouseTypeMapper;
    @Autowired
    SysErrorService sysErrorService;
    @Autowired
    LogService logService;
    public String saveMaterialStore(Map<String,Object> object) {
        String saveState = "true";
@@ -54,6 +58,10 @@
            if (object.get("height") != null) {
                height = Double.parseDouble(object.get("height").toString());
            }
            Log log = new Log();
            log.setContent(object.toString());
            DecimalFormat decimalFormat = new DecimalFormat("#0.00");
            singlePieceArea= Double.parseDouble(decimalFormat.format(width * height / 100000));
            Integer jsonCount=materialStoreMapper.selectMaterialStoreJson(json);
@@ -63,12 +71,15 @@
                    if (Objects.equals(type, "原片")){
                        materialInventoryMapper.updateMaterialInventoryArea(Long.valueOf(id),singlePieceArea);
                    }
                    log.setFunction("saveMaterialStore修改");
                }else{
                    materialStoreMapper.insertMaterialStore(type,json);
                    log.setFunction("saveMaterialStore新增");
                }
            }else{
                saveState = "false1";
            }
            logService.saveLog(log);
        } catch (Exception e) {
            TransactionAspectSupport.currentTransactionStatus().rollbackToSavepoint(savePoint);
@@ -111,6 +122,10 @@
                }
            }
            Log log = new Log();
            log.setContent(object.toString());
            log.setFunction("deleteMaterialStore删除:"+id);
            logService.saveLog(log);
north-glass-erp/src/main/java/com/example/erp/service/pp/WorkOrderService.java
@@ -57,10 +57,15 @@
        String orderId = orderDetaillist.get(0).getOrderId();
        for (OrderDetail orderDetail : orderDetaillist) {
            if(orderDetail.getOrderId()!= orderId){
                orderId = orderDetail.getOrderId();
                letters = '1';
                lettr = 'A';
            }
            //生成生产订单号
            for (int i = 0; i < count; i++) {
                letters = lettr++;
                productIdVl = orderId + letters;
                productIdVl = orderDetail.getOrderId() + letters;
                //查询生成的生产订单号是否存在
                Integer workCount = workOrderMapper.selectOrderNumber(productIdVl);
                if (workCount < 1) {
north-glass-erp/src/main/java/com/example/erp/service/sd/CustomerService.java
@@ -7,9 +7,11 @@
import com.example.erp.dto.sd.DeliveryDetailDTO;
import com.example.erp.dto.sd.DeliveryDetailProductDTO;
import com.example.erp.entity.sd.*;
import com.example.erp.entity.userInfo.Log;
import com.example.erp.entity.userInfo.SysError;
import com.example.erp.mapper.mm.FinishedGoodsInventoryMapper;
import com.example.erp.mapper.sd.*;
import com.example.erp.service.userInfo.LogService;
import com.example.erp.service.userInfo.SysErrorService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@@ -28,6 +30,8 @@
    CustomerMapper customerMapper;
    @Autowired
    SysErrorService sysErrorService;
    @Autowired
    LogService logService;
    public Map<String, Object> getSelectCustomer(Integer pageNum, Integer pageSize, Customer customer) {
@@ -42,6 +46,8 @@
    public Boolean insertCustomer(Map<String,Object> object) {
        boolean saveState = true;
        Log log = new Log();
        log.setContent(object.toString());
        //设置回滚点
        Object savePoint = TransactionAspectSupport.currentTransactionStatus().createSavepoint();
        try {
@@ -49,9 +55,12 @@
           if(customer!=null){
               if (customer.getId()!=null && customer.getId()!=0){
                   customerMapper.updateCustomer(customer);
                   log.setFunction("insertCustomer修改");
               }else{
                   customerMapper.insertCustomer(customer);
                   log.setFunction("insertCustomer新增");
               }
               logService.saveLog(log);
           }
@@ -79,6 +88,10 @@
                if (customer.getId()!=null){
                    customerMapper.deleteCustomer(customer);
                }
                Log log = new Log();
                log.setContent(object.toString());
                log.setFunction("deleteCustomer删除");
                logService.saveLog(log);
            }
north-glass-erp/src/main/java/com/example/erp/service/sd/DeliveryService.java
@@ -410,6 +410,10 @@
        deliveryMapper.updateDeliveryToExamine(deliveryId,type);
        Log log = new Log();
        log.setContent(object.toString());
        log.setFunction("updateDeliveryToExamine修改:"+deliveryId);
        logService.saveLog(log);
        return true;
@@ -438,6 +442,11 @@
            deliveryDetailMapper.deleteDeliveryDetail(deliveryId);
            deliveryMapper.deleteDelivery(deliveryId);
            Log log = new Log();
            log.setContent(object.toString());
            log.setFunction("deleteDelivery删除:"+deliveryId);
            logService.saveLog(log);
            return true;
        }catch (Exception e) {
            TransactionAspectSupport.currentTransactionStatus().rollbackToSavepoint(savePoint);
north-glass-erp/src/main/resources/mapper/pp/WordOrder.xml
@@ -142,7 +142,7 @@
        from sd.order_detail as od
        left join sd.order as o
        on od.order_id =o.order_id
        where od.order_id = #{orderId} and o.production_order!=2
        where FIND_IN_SET(od.order_id,#{orderId})    and o.production_order!=2
        <if test="orderDetail.orderId != null and orderDetail.orderId != ''">
            and od.order_id regexp #{orderDetail.orderId}
        </if>