Merge branch 'master' of http://10.153.19.25:10101/r/ERP_override
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <project version="4"> |
| | | <component name="dataSourceStorageLocal" created-in="IU-232.9559.62"> |
| | | <component name="dataSourceStorageLocal" created-in="IU-232.8660.185"> |
| | | <data-source name="@localhost [2]" uuid="165c5447-d19a-4aaf-af5f-cee92ae696c2"> |
| | | <database-info product="MySQL" version="8.0.22" jdbc-version="4.2" driver-name="MySQL Connector/J" driver-version="mysql-connector-java-8.0.25 (Revision: 08be9e9b4cba6aa115f9b27b215887af40b159e0)" dbms="MYSQL" exact-version="8.0.22" exact-driver-version="8.0"> |
| | | <extra-name-characters>#@</extra-name-characters> |
| | |
| | | {type: 'checkbox', fixed: "left", title: '选择'}, |
| | | {field: 'orderNumber', title: '订序', filters: [{data: ''}], slots: {filter: 'num1_filter'},filterMethod:filterChanged}, |
| | | {field: 'shape', title: '形状', showOverflow: "ellipsis", filters: [{data: ''}], slots: {filter: 'num1_filter'},filterMethod:filterChanged}, |
| | | {field: 'width', title: '宽', sortable: true, filters: [{data: ''}], slots: {filter: 'num1_filter'},filterMethod:filterChanged}, |
| | | {field: 'height', title: '高', sortable: true, filters: [{data: ''}], slots: {filter: 'num1_filter'},filterMethod:filterChanged}, |
| | | {field: 'baiscQuantity', title: '待分数量', showOverflow: "ellipsis"}, |
| | | {field: 'computeGrossArea', title: '待分面积'}, |
| | | {field: 'totalThickness', title: '总厚度'}, |
| | | {field: 'thickness', title: '玻璃厚度'}, |
| | | {field: 'width', title: '宽', sortable: true, filters: [{data: ''}], slots: {filter: 'num1_filter'},filterMethod:filterChanged,width:'60px'}, |
| | | {field: 'height', title: '高', sortable: true, filters: [{data: ''}], slots: {filter: 'num1_filter'},filterMethod:filterChanged,width:'60px'}, |
| | | {field: 'baiscQuantity', title: '待分数量', showOverflow: "ellipsis",width:'60px'}, |
| | | {field: 'computeGrossArea', title: '待分面积',width:'60px'}, |
| | | {field: 'totalThickness', title: '总厚度',width:'80px'}, |
| | | {field: 'thickness', title: '玻璃厚度',width:'60px'}, |
| | | {field: 'weight', title: '重量'} |
| | | ],//表头按钮 |
| | | |
| | |
| | | if (res.code == 200) { |
| | | ElMessage.success("保存成功") |
| | | //router.push('/main/processCard/SplittingDetails?orderId=${orderId}') |
| | | router.push({path: '/main/processCard/SplittingDetails', query: {orderId: orderId}}) |
| | | router.push({path: '/main/processCard/AddProcessCard', query: {orderId: orderId,productionId:productionId,random:Math.random()}}) |
| | | |
| | | //location.reload(); |
| | | } else { |
| | | ElMessage.warning(res.msg) |
| | | router.push("/login") |
| | | } |
| | | }) |
| | | |
| | |
| | | </script> |
| | | |
| | | <template> |
| | | <div> |
| | | <div style="width: 100%;height: 100%"> |
| | | |
| | | <div class="common-layout" style="height: 100%"> |
| | | <div class="header"> |
| | | <div class="common-layout" style="width: 100%;height: 100%"> |
| | | <div class="header" style="height: 5%;width: 100%"> |
| | | |
| | | <el-button |
| | | style="float: left" |
| | |
| | | |
| | | </div> |
| | | </div> |
| | | <el-container height="600px"> |
| | | <el-aside width="44%" > |
| | | <el-container style="height: 100%;width: 100%"> |
| | | <el-aside style="width: 44%;height: 100%" > |
| | | <vxe-grid |
| | | max-height="100%" |
| | | class="mytable-scrollbar" |
| | |
| | | |
| | | </el-aside> |
| | | |
| | | <el-main width="12%" style=""> |
| | | <span>选中数量:<el-input type="number" v-model="checkedNum"></el-input></span><br> |
| | | <el-button type="primary" @click="addRight"> →</el-button> |
| | | <br> |
| | | <br> |
| | | <el-button type="primary" @click="addLeft"> ←</el-button> |
| | | <br> |
| | | <br> |
| | | <el-button @click="createProcessCard" type="primary">建立流程卡</el-button> |
| | | </el-main> |
| | | <div width="12%"> |
| | | <el-main style=""> |
| | | <span>选中数量:<el-input type="number" v-model="checkedNum"></el-input></span><br> |
| | | <el-button type="primary" @click="addRight"> →</el-button> |
| | | <br> |
| | | <br> |
| | | <el-button type="primary" @click="addLeft"> ←</el-button> |
| | | <br> |
| | | <br> |
| | | <el-button @click="createProcessCard" type="primary">建立流程卡</el-button> |
| | | </el-main> |
| | | </div> |
| | | |
| | | |
| | | <!-- 右侧--> |
| | | <el-aside width="45%" height="500px" style=""> |
| | | <div style="height: 100%;width: 100%"> |
| | | |
| | | <el-aside style="width: 100%;height: 100%"> |
| | | <vxe-grid |
| | | |
| | | max-height="97%" |
| | | max-height="100%" |
| | | class="mytable-scrollbar" |
| | | ref="xGrid" |
| | | v-bind="gridOptions" |
| | |
| | | </template> |
| | | </vxe-grid> |
| | | </el-aside> |
| | | </div> |
| | | </el-container> |
| | | </div> |
| | | </div> |
| | |
| | | import request from "@/utils/request"; |
| | | import deepClone from "@/utils/deepClone"; |
| | | import {ElMessage} from "element-plus"; |
| | | import {useRouter} from "vue-router"; |
| | | import {useRouter,useRoute,onBeforeRouteUpdate} from "vue-router"; |
| | | import GlassType from '@/components/basic/product/GlassType.vue' |
| | | |
| | | |
| | | const route = useRoute() |
| | | const router = useRouter() |
| | | let indexFlag=$ref(1) |
| | | function changeRouter(index){ |
| | |
| | | </div> |
| | | |
| | | <div id="main-body"> |
| | | <router-view /> |
| | | <router-view :key="route.fullPath" /> |
| | | </div> |
| | | </div> |
| | | </template> |
| | |
| | | |
| | | //点击时查询 |
| | | const getWorkOrder = () => { |
| | | let startTime = form.date1[0] |
| | | let endTime = form.date1[1] |
| | | let selectProcesses = value.value |
| | | let selectState = stateValue.value |
| | | let inputVal = form.orderId |
| | |
| | | //禁用删除、保存按钮 |
| | | gridOptions.toolbarConfig.buttons[0].disabled = true |
| | | gridOptions.toolbarConfig.buttons[1].disabled = true |
| | | //启用保存 |
| | | gridOptions.toolbarConfig.buttons[2].disabled = false |
| | | } else { |
| | | ElMessage.warning(res.msg) |
| | | } |
| | | }) |
| | | } else if (inputVal != null && selectState == 1) { |
| | | |
| | | //根据订单号查询未排产数据 |
| | | //根据工序查询未排产数据 |
| | | request.post(`/productionScheduling/selectScheduling/${startTime}/${endTime}/${inputVal}/${selectProcesses}/${selectState}`, filterData.value).then((res) => { |
| | | if (res.code == 200) { |
| | | pageTotal.value = res.data.total |
| | |
| | | //禁用删除、保存按钮 |
| | | gridOptions.toolbarConfig.buttons[0].disabled = true |
| | | gridOptions.toolbarConfig.buttons[1].disabled = true |
| | | //启用保存 |
| | | gridOptions.toolbarConfig.buttons[2].disabled = false |
| | | } else { |
| | | ElMessage.warning(res.msg) |
| | | } |
| | | }) |
| | | } else if (inputVal == null && selectState == 2) { |
| | | //根据时间查询已排产数据 |
| | | console.log(startTime, endTime, selectProcesses, selectState) |
| | | request.post(`/productionScheduling/selectScheduling/${startTime}/${endTime}/${inputVal}/${selectProcesses}/${selectState}`, filterData.value).then((res) => { |
| | | if (res.code == 200) { |
| | | pageTotal.value = res.data.total |
| | |
| | | } |
| | | const type = await VXETable.modal.confirm('您确定要删除该数据?') |
| | | if (type === 'confirm') { |
| | | //保存排产数据 |
| | | request.post("/productionScheduling/deleteScheduling").then((res) => { |
| | | let schedulingData = ref({ |
| | | scheduling: selectRecords, |
| | | }) |
| | | |
| | | request.post("/productionScheduling/deleteScheduling",schedulingData.value).then((res) => { |
| | | if (res.code == 200) { |
| | | ElMessage.success("保存成功") |
| | | ElMessage.success("删除成功") |
| | | location.reload(); |
| | | } else { |
| | | ElMessage.warning(res.msg) |
| | |
| | | }) |
| | | } |
| | | } |
| | | |
| | | return; |
| | | } |
| | | case 'review': { |
| | | const $table = xGrid.value |
| | | const selectRecords = $table.getCheckboxRecords() |
| | | if ($table) { |
| | | if (selectRecords.length == 0) { |
| | | ElMessage.warning("请勾选排产数据") |
| | | return; |
| | | } |
| | | let schedulingData = ref({ |
| | | scheduling: selectRecords, |
| | | userName: username//审核人 |
| | | }) |
| | | request.post("/productionScheduling/examineScheduling",schedulingData.value).then((res) => { |
| | | if (res.code == 200) { |
| | | ElMessage.success("审核成功") |
| | | location.reload(); |
| | | } else { |
| | | ElMessage.warning(res.msg) |
| | | |
| | | } |
| | | }) |
| | | |
| | | } |
| | | return; |
| | | } |
| | | } |
| | | } |
| | | }, |
| | |
| | | form.date1=getNowTime() |
| | | let startTime = form.date1[0] |
| | | let endTime = form.date1[1] |
| | | |
| | | let total = reactive({ |
| | | pageTotal : 0, |
| | | dataTotal : 0, |
| | | pageSize : 100 |
| | | }) |
| | | //第一次加载数据 |
| | | |
| | | request.post(`/processCard/flowCard/${startTime}/${endTime}`, filterData.value).then((res) => { |
| | | request.post(`/processCard/flowCard/1/${total.pageSize}/${startTime}/${endTime}`, filterData.value).then((res) => { |
| | | |
| | | if (res.code == 200) { |
| | | total.dataTotal = res.data.total.total*1 |
| | | total.pageTotal= res.data.total.pageTotal |
| | | pageTotal.value = res.data.total |
| | | produceList = produceList.value.concat(deepClone(res.data.data)) |
| | | xGrid.value.reloadData(produceList) |
| | |
| | | ElMessage.warning(res.msg) |
| | | } |
| | | }) |
| | | } |
| | | |
| | | //页脚跳转 |
| | | const handlePageChange = ({ currentPage, pageSize }) => { |
| | | pageNum.value=currentPage |
| | | total.pageTotal = pageSize |
| | | selectOrderList() |
| | | } |
| | | |
| | | /*使用筛选,后端获取数据*/ |
| | |
| | | ],//table body实际数据 |
| | | //脚部求和 |
| | | footerMethod ({ columns, data }) {//页脚函数 |
| | | let footList=['总数量','总面积','分箱数'] |
| | | return[ |
| | | columns.map((column, columnIndex) => { |
| | | if (columnIndex === 0) { |
| | | return '合计:' |
| | | } |
| | | if (footList.includes(column.field)) { |
| | | return sumNum(data, column.field) |
| | | } |
| | | // if (props.tableProp.footList.includes(column.field)) { |
| | | // return sumNum(data, column.field) |
| | | // } |
| | | return '' |
| | | }) |
| | | ] |
| | |
| | | </div> |
| | | </div> |
| | | </template> |
| | | |
| | | <template #pager> |
| | | <!--使用 pager 插槽--> |
| | | <!-- 'PrevJump','NextJump', --> |
| | | <vxe-pager |
| | | @page-change="handlePageChange" |
| | | :layouts="[ 'PrevPage', 'Jump','PageCount', 'NextPage', 'Total']" |
| | | v-model:current-page="pageNum" |
| | | v-model:page-size="total.pageSize" |
| | | v-model:pager-count="total.pageTotal" |
| | | :total="total.dataTotal" |
| | | > |
| | | </vxe-pager> |
| | | </template> |
| | | |
| | | </vxe-grid> |
| | | </div> |
| | |
| | | import com.example.erp.entity.sd.OrderGlassDetail; |
| | | import com.example.erp.exception.ServiceException; |
| | | import com.example.erp.service.pp.FlowCardService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | |
| | | import java.util.Map; |
| | | |
| | | @RestController |
| | | @Api(value="流程卡controller",tags={"流程卡操作接口"}) |
| | | @RequestMapping("/processCard") |
| | | public class ProcessCardController { |
| | | @Autowired |
| | | FlowCardService flowCardService; |
| | | |
| | | //流程卡管理查询 |
| | | @PostMapping ("/flowCard/{selectTime1}/{selectTime2}") |
| | | public Result DateProcess( |
| | | @ApiOperation("流程卡管理查询接口") |
| | | @PostMapping ("/flowCard/{pageNum}/{pageSize}/{selectTime1}/{selectTime2}") |
| | | public Result dateProcess( |
| | | @PathVariable Integer pageNum, |
| | | @PathVariable Integer pageSize, |
| | | @PathVariable Date selectTime1, |
| | | @PathVariable Date selectTime2, |
| | | @RequestBody FlowCard flowCard){ |
| | | return Result.seccess(flowCardService.selectProcessCard(selectTime1,selectTime2,flowCard)); |
| | | return Result.seccess(flowCardService.selectProcessCard(pageNum,pageSize,selectTime1,selectTime2,flowCard)); |
| | | |
| | | } |
| | | |
| | | //分架查询 |
| | | @ApiOperation("分架查询接口") |
| | | @PostMapping ("/selectAddProcess/{selectTime1}/{selectTime2}") |
| | | public Result SelectAddProcess( |
| | | public Result selectAddProcess( |
| | | @PathVariable Date selectTime1, |
| | | @PathVariable Date selectTime2, |
| | | @RequestBody FlowCard flowCard){ |
| | |
| | | } |
| | | |
| | | //分架明细查询 |
| | | @ApiOperation("分架明细查询接口") |
| | | @PostMapping ("/detailsSelect/{orderId}") |
| | | |
| | | public Result DetailsSelect( |
| | | public Result detailsSelect( |
| | | @PathVariable String orderId, |
| | | @RequestBody FlowCard flowCard){ |
| | | return Result.seccess(flowCardService.DetailsSelectSv(orderId,flowCard)); |
| | | return Result.seccess(flowCardService.detailsSelectSv(orderId,flowCard)); |
| | | |
| | | } |
| | | |
| | | |
| | | //删除工单 |
| | | @ApiOperation("删除工单接口") |
| | | @PostMapping("/deleteFlowCard/{orderId}/{processId}") |
| | | public Result deleteOrderWork( |
| | | @PathVariable String orderId, |
| | | @PathVariable String processId |
| | | ){ |
| | | if(flowCardService.DeleteFlowCardSv(orderId,processId)){ |
| | | if(flowCardService.deleteFlowCardSv(orderId,processId)){ |
| | | return Result.seccess(); |
| | | }else { |
| | | throw new ServiceException(Constants.Code_500,"删除失败"); |
| | |
| | | } |
| | | |
| | | //修改排版状态 |
| | | @ApiOperation("修改排版状态接口") |
| | | @PostMapping("/updateLayoutStatus/{processId}") |
| | | public Result updateLayoutStatus( |
| | | @PathVariable String processId |
| | | ){ |
| | | if(flowCardService.UpdateLayoutStatusSv(processId)){ |
| | | if(flowCardService.updateLayoutStatusSv(processId)){ |
| | | return Result.seccess(); |
| | | }else { |
| | | throw new ServiceException(Constants.Code_500,"修改失败"); |
| | |
| | | } |
| | | |
| | | //分架新增明细查询 |
| | | @ApiOperation("分架明细新增接口") |
| | | @PostMapping ("/selectNoCard/{orderId}/{productionId}") |
| | | public Result SelectNoCard( |
| | | @PathVariable String orderId, |
| | | @PathVariable String productionId, |
| | | @RequestBody FlowCard flowCard){ |
| | | return Result.seccess(flowCardService.SelectNoCardSv(orderId,productionId,flowCard)); |
| | | return Result.seccess(flowCardService.selectNoCardSv(orderId,productionId,flowCard)); |
| | | |
| | | } |
| | | |
| | | //添加流程卡 |
| | | @ApiOperation("流程卡创建接口") |
| | | @PostMapping("/addFlowCard") |
| | | public Result AddOrderWork( @RequestBody Map<String,Object> object){ |
| | | if(flowCardService.AddFlowCardSv(object)){ |
| | | if(flowCardService.addFlowCardSv(object)){ |
| | | return Result.seccess(); |
| | | }else { |
| | | throw new ServiceException(Constants.Code_500,"保存失败"); |
| | |
| | | } |
| | | } |
| | | |
| | | //查询第一次排版数据 |
| | | //查询第一次排产数据 |
| | | @ApiOperation("排产界面加载查询接口") |
| | | @PostMapping ("/selectLastScheduling/{selectTime1}/{selectTime2}") |
| | | public Result selectLastScheduling( |
| | | @PathVariable String selectTime1, |
| | |
| | | return Result.seccess(flowCardService.selectLastScheduling(selectTime1,selectTime2,flowCard)); |
| | | |
| | | } |
| | | //查询排版数据 |
| | | //查询排产数据 |
| | | @ApiOperation("排产点击按钮查询接口") |
| | | @PostMapping ("/selectScheduling/{selectTime1}/{selectTime2}/{orderId}/{processes}/{state}") |
| | | public Result selectScheduling( |
| | | @PathVariable String selectTime1, |
| | |
| | | @PathVariable String processes, |
| | | @PathVariable Integer state, |
| | | @RequestBody FlowCard flowCard){ |
| | | return Result.seccess(flowCardService.SelectSchedulingSv(selectTime1,selectTime2,orderId,processes,state,flowCard)); |
| | | return Result.seccess(flowCardService.selectSchedulingSv(selectTime1,selectTime2,orderId,processes,state,flowCard)); |
| | | |
| | | } |
| | | |
| | |
| | | |
| | | //点击查询排版数据(带订单号查询) |
| | | @PostMapping ("/selectSchedulingNot/{selectTime1}/{selectTime2}/{orderId}/{processes}/{state}") |
| | | public Result SelectSchedulingNot( |
| | | public Result selectSchedulingNot( |
| | | @PathVariable String selectTime1, |
| | | @PathVariable String selectTime2, |
| | | @PathVariable String orderId, |
| | | @PathVariable String processes, |
| | | @PathVariable Integer state, |
| | | @RequestBody ProductionScheduling productionScheduling){ |
| | | return Result.seccess(productionSchedulingService.SelectSchedulingNotSv(selectTime1,selectTime2,orderId,processes,state,productionScheduling)); |
| | | return Result.seccess(productionSchedulingService.selectSchedulingNotSv(selectTime1,selectTime2,orderId,processes,state,productionScheduling)); |
| | | |
| | | } |
| | | |
| | |
| | | } |
| | | } |
| | | |
| | | //添加排产数据 |
| | | //删除排产数据 |
| | | @PostMapping("/deleteScheduling") |
| | | public Result DeleteScheduling( @RequestBody Map<String,Object> object){ |
| | | public Result deleteScheduling( @RequestBody Map<String,Object> object) throws Exception{ |
| | | |
| | | if(productionSchedulingService.AddSchedulingSv(object)){ |
| | | if(productionSchedulingService.deleteSchedulingSv(object)){ |
| | | return Result.seccess(); |
| | | }else { |
| | | throw new ServiceException(Constants.Code_500,"保存失败"); |
| | | throw new ServiceException(Constants.Code_500,"删除失败"); |
| | | |
| | | } |
| | | } |
| | | |
| | | @PostMapping("/examineScheduling") |
| | | public Result ExamineScheduling( @RequestBody Map<String,Object> object){ |
| | | |
| | | if(productionSchedulingService.ExamineSchedulingSv(object)){ |
| | | return Result.seccess(); |
| | | }else { |
| | | throw new ServiceException(Constants.Code_500,"审核失败"); |
| | | |
| | | } |
| | | } |
| | |
| | | } |
| | | } |
| | | |
| | | @ApiOperation("订单调拨接口") |
| | | @ApiOperation("补片审核接口") |
| | | @PostMapping("/updateReplenish") |
| | | public Result updateReplenish( @RequestBody Map<String,Object> object){ |
| | | if(replenishService.updateReplenish(object)){ |
| | |
| | | |
| | | //查询工单 |
| | | @PostMapping ("/orderGlassDetail/{selectTime1}/{selectTime2}/{state}") |
| | | public Result DateWork( |
| | | public Result dateWork( |
| | | @PathVariable Date selectTime1, |
| | | @PathVariable Date selectTime2, |
| | | @PathVariable Integer state, |
| | |
| | | //转生产订单查询 |
| | | @PostMapping ("/addWork/{orderId}") |
| | | |
| | | public Result AddWork( |
| | | public Result addWork( |
| | | @PathVariable String orderId, |
| | | @RequestBody OrderDetail orderDetail){ |
| | | return Result.seccess(workOrderService.AddDateWork(orderId,orderDetail)); |
| | | return Result.seccess(workOrderService.addDateWork(orderId,orderDetail)); |
| | | |
| | | } |
| | | |
| | | |
| | | //添加工单 |
| | | @PostMapping("/addOrderWork") |
| | | public Result AddOrderWork( @RequestBody Map<String,Object> object){ |
| | | public Result addOrderWork( @RequestBody Map<String,Object> object){ |
| | | |
| | | if(workOrderService.AddOrderWorkSv(object)){ |
| | | if(workOrderService.addOrderWorkSv(object)){ |
| | | return Result.seccess(); |
| | | }else { |
| | | throw new ServiceException(Constants.Code_500,"保存失败"); |
| | |
| | | @PathVariable String orderId, |
| | | @PathVariable String productName |
| | | ){ |
| | | if(workOrderService.DeleteOrderWorkSv(orderId,productName)){ |
| | | if(workOrderService.deleteOrderWorkSv(orderId,productName)){ |
| | | return Result.seccess(); |
| | | }else { |
| | | throw new ServiceException(Constants.Code_500,"删除失败"); |
| | |
| | | @Mapper |
| | | public interface FlowCardMapper { |
| | | //流程卡管理查询 |
| | | List<FlowCard> selectFlowCard(Date selectTime1, Date selectTime2,FlowCard flowCard); |
| | | List<FlowCard> selectFlowCard(Integer offset, Integer pageSize, Date selectTime1, Date selectTime2, FlowCard flowCard); |
| | | |
| | | //分页查询 |
| | | Map<String, Integer> getPageTotal(Integer offset, Integer pageSize, Date selectTime1, Date selectTime2, FlowCard flowCard); |
| | | |
| | | //分架数据查询 |
| | | List<FlowCard> selectFlowCardMp(Date selectTime1, Date selectTime2, FlowCard flowCard); |
| | | |
| | | //分架明细查询 |
| | | List<FlowCard> DetailsSelectMp(String orderId, FlowCard flowCard); |
| | | List<FlowCard> detailsSelectMp(String orderId, FlowCard flowCard); |
| | | |
| | | //删除流程卡 |
| | | Boolean DeleteFlowCardMp(String orderId, String processId); |
| | | Boolean deleteFlowCardMp(String orderId, String processId); |
| | | |
| | | //分架新增明细查询 |
| | | List<Map<String,String>> SelectNoCardMp(String orderId, String productionId, FlowCard flowCard); |
| | | List<Map<String, String>> selectNoCardMp(String orderId, String productionId, FlowCard flowCard); |
| | | |
| | | //修改排版状态 |
| | | Boolean UpdateLayoutStatusMp(String processId); |
| | | Boolean updateLayoutStatusMp(String processId); |
| | | |
| | | Integer SelectLayoutStatus(String processId); |
| | | Integer selectLayoutStatus(String processId); |
| | | |
| | | //查询报工表内是否存在对应流程卡的数据 |
| | | Integer ReportingWorkCount(String processId); |
| | | Integer reportingWorkCount(String processId); |
| | | |
| | | //插入Flow_card表 |
| | | Boolean AddFlowCardMp(String processId, Integer orderNumber, Integer landingSequence, Integer quantity, String productionId, String userName,Integer layer); |
| | | Boolean addFlowCardMp(String processId, Integer orderNumber, Integer landingSequence, Integer quantity, String productionId, String userName, Integer layer); |
| | | |
| | | Boolean UpdateFlowState(String productionId, Integer orderNumber); |
| | | Boolean updateFlowState(String productionId, Integer orderNumber); |
| | | |
| | | Integer SelectFlowCount(String productionId); |
| | | Integer selectFlowCount(String productionId); |
| | | |
| | | |
| | | Boolean UpdateProcessingCard(String productionId, int state); |
| | | Boolean updateProcessingCard(String productionId, int state); |
| | | |
| | | Boolean UpdateDeleteState(String orderId, String processId); |
| | | Boolean updateDeleteState(String orderId, String processId); |
| | | |
| | | List<FlowCard> SelectOkSchedulingMp(String selectTime1, String selectTime2, String orderId,String processes, FlowCard flowCard); |
| | | List<FlowCard> selectOkSchedulingMp(String selectTime1, String selectTime2, String orderId, String processes, FlowCard flowCard); |
| | | |
| | | List<FlowCard> SelectNoSchedulingMp(String selectTime1, String selectTime2, String orderId,String processes, FlowCard flowCard); |
| | | List<FlowCard> selectNoSchedulingMp(String selectTime1, String selectTime2, String orderId, String processes, FlowCard flowCard); |
| | | |
| | | List<Map<String,String>> selectLastSchedulingMp(String selectTime1, String selectTime2, FlowCard flowCard); |
| | | List<Map<String, String>> selectLastSchedulingMp(String selectTime1, String selectTime2, FlowCard flowCard); |
| | | |
| | | Integer SelectLayer(String productionId, Integer orderNumber); |
| | | Integer selectLayer(String productionId, Integer orderNumber); |
| | | |
| | | |
| | | } |
| | |
| | | |
| | | Boolean updateReplenish(@Param("patchLog") PatchLog patchLog , @Param("userName") String userName); |
| | | |
| | | Boolean updateOrderProcessDetail(@Param("patchLog") PatchLog patchLog ); |
| | | |
| | | List<Map<String,Object>> getSelectReplenish(@Param("offset") Integer offset, @Param("pageSize") Integer pageSiz); |
| | | |
| | | |
| | |
| | | package com.example.erp.mapper.pp; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.example.erp.entity.pp.ProductionScheduling; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | |
| | | import java.util.Map; |
| | | |
| | | @Mapper |
| | | public interface ProductionSchedulingMapper { |
| | | public interface ProductionSchedulingMapper extends BaseMapper<ProductionScheduling> { |
| | | |
| | | |
| | | List<Map<String,String>> SelectOkSchedulingMp(String selectTime1, String selectTime2,String orderId,String processes, ProductionScheduling productionScheduling); |
| | |
| | | |
| | | List<Map<String,String>> selectLastSchedulingMp(String selectTime1, String selectTime2, ProductionScheduling productionScheduling); |
| | | |
| | | List<Map<String,String>> SelectSchedulingNotMp(String selectTime1, String selectTime2, String orderId, String processes, ProductionScheduling productionScheduling); |
| | | List<Map<String,String>> selectSchedulingNotMp(String selectTime1, String selectTime2, String orderId, String processes, ProductionScheduling productionScheduling); |
| | | |
| | | Integer selectMaxId(); |
| | | |
| | | Boolean insertSelective(String schedulingId, String orderId, String orderNumber, String processes, Integer schedulingQuantity, LocalDate scheduledStartTime, LocalDate planEndTime, String notes); |
| | | |
| | | Boolean ExamineSchedulingMp(String schedulingId, String userName); |
| | | |
| | | Boolean deleteSchedulingMp(String schedulingId); |
| | | } |
| | |
| | | List<OrderDetail> addWordOrder(String orderId, OrderDetail orderDetail); |
| | | |
| | | //转工单 |
| | | Boolean AddOrderWorkMp(String productIdVl, |
| | | Boolean addOrderWorkMp(String productIdVl, |
| | | @Param("orderId") String orderId, |
| | | @Param("productId") Integer productId, |
| | | @Param("productName") String productName, |
| | | String userName); |
| | | //查询对应订单号订序 |
| | | Integer SelectOrderNumber(String productIdVl); |
| | | Integer selectOrderNumber(String productIdVl); |
| | | |
| | | //删除工单,将对应产品生产订单号改为null |
| | | Boolean DeleteOrderWorkMp(String orderId, String productName); |
| | | Boolean deleteOrderWorkMp(String orderId, String productName); |
| | | |
| | | Integer SelectWorkCount(String orderId); |
| | | Integer selectWorkCount(String orderId); |
| | | |
| | | Boolean UpdateWorkType(String orderId, Integer state); |
| | | Boolean updateWorkType(String orderId, Integer state); |
| | | |
| | | Integer SelectYesWorkCount(String orderId); |
| | | Integer selectYesWorkCount(String orderId); |
| | | } |
| | |
| | | FlowCardMapper flowCardMapper; |
| | | |
| | | //流程卡管理查询 |
| | | public Map<String, Object> selectProcessCard(Date selectTime1, Date selectTime2, FlowCard flowCard) { |
| | | public Map<String, Object> selectProcessCard(Integer pageNum, Integer pageSize,Date selectTime1, Date selectTime2, FlowCard flowCard) { |
| | | Integer offset = (pageNum-1)*pageSize; |
| | | Map<String, Object> map = new HashMap<>(); |
| | | //System.out.println(flowCardMapper.selectFlowCard( selectTime1,selectTime2, flowCard)); |
| | | map.put("data", flowCardMapper.selectFlowCard(selectTime1, selectTime2, flowCard)); |
| | | map.put("data", flowCardMapper.selectFlowCard(offset, pageSize,selectTime1, selectTime2, flowCard)); |
| | | map.put("total",flowCardMapper.getPageTotal(offset, pageSize, selectTime1, selectTime2, flowCard)); |
| | | System.out.println(map); |
| | | return map; |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | //分架明细查询 |
| | | public Map<String, Object> DetailsSelectSv(String orderId, FlowCard flowCard) { |
| | | public Map<String, Object> detailsSelectSv(String orderId, FlowCard flowCard) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("data", flowCardMapper.DetailsSelectMp(orderId, flowCard)); |
| | | map.put("data", flowCardMapper.detailsSelectMp(orderId, flowCard)); |
| | | return map; |
| | | } |
| | | |
| | | //删除流程卡 |
| | | public Boolean DeleteFlowCardSv(String orderId, String processId) { |
| | | public Boolean deleteFlowCardSv(String orderId, String processId) { |
| | | if (!orderId.isEmpty() && !processId.isEmpty()) { |
| | | Integer count = flowCardMapper.ReportingWorkCount(processId); |
| | | Integer count = flowCardMapper.reportingWorkCount(processId); |
| | | if (count == 0) { |
| | | //修改订单表分架状态为1,未全部分架完成 |
| | | flowCardMapper.UpdateProcessingCard(orderId, 1); |
| | | flowCardMapper.updateProcessingCard(orderId, 1); |
| | | //修改分架状态 |
| | | flowCardMapper.UpdateDeleteState(orderId, processId); |
| | | flowCardMapper.updateDeleteState(orderId, processId); |
| | | //删除分架明细 |
| | | flowCardMapper.DeleteFlowCardMp(orderId, processId); |
| | | flowCardMapper.deleteFlowCardMp(orderId, processId); |
| | | return true; |
| | | } else { |
| | | return false; |
| | |
| | | } |
| | | |
| | | //分架新增明细查询 |
| | | public Map<String, Object> SelectNoCardSv(String orderId, String productionId, FlowCard flowCard) { |
| | | public Map<String, Object> selectNoCardSv(String orderId, String productionId, FlowCard flowCard) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("data", flowCardMapper.SelectNoCardMp(orderId, productionId, flowCard)); |
| | | map.put("data", flowCardMapper.selectNoCardMp(orderId, productionId, flowCard)); |
| | | return map; |
| | | } |
| | | |
| | | |
| | | //修改排版状态 |
| | | public Boolean UpdateLayoutStatusSv(String processId) { |
| | | public Boolean updateLayoutStatusSv(String processId) { |
| | | |
| | | if (!processId.isEmpty()) { |
| | | Integer Status = flowCardMapper.SelectLayoutStatus(processId); |
| | | Integer Status = flowCardMapper.selectLayoutStatus(processId); |
| | | if (Status == 1) { |
| | | flowCardMapper.UpdateLayoutStatusMp(processId); |
| | | flowCardMapper.updateLayoutStatusMp(processId); |
| | | } else { |
| | | return false; |
| | | } |
| | |
| | | } |
| | | |
| | | //保存流程卡数据 |
| | | public Boolean AddFlowCardSv(Map<String, Object> object) { |
| | | public Boolean addFlowCardSv(Map<String, Object> object) { |
| | | String userName = ""; |
| | | if (object.get("userName") != null) { |
| | | userName = object.get("userName").toString(); |
| | |
| | | if (!FlowCardList.isEmpty()) { |
| | | for (FlowCard flowCard : FlowCardList) { |
| | | //查询每个序号的层数 |
| | | Integer layer = flowCardMapper.SelectLayer(productionId, flowCard.getOrderNumber()); |
| | | Integer layer = flowCardMapper.selectLayer(productionId, flowCard.getOrderNumber()); |
| | | //添加流程卡数据 |
| | | flowCardMapper.AddFlowCardMp(flowCard.getProcessId(), flowCard.getOrderNumber(), flowCard.getLandingSequence(), flowCard.getQuantity(), productionId, userName,layer); |
| | | flowCardMapper.addFlowCardMp(flowCard.getProcessId(), flowCard.getOrderNumber(), flowCard.getLandingSequence(), flowCard.getQuantity(), productionId, userName,layer); |
| | | //修改分架状态,将状态改为1 |
| | | flowCardMapper.UpdateFlowState(productionId, flowCard.getOrderNumber()); |
| | | flowCardMapper.updateFlowState(productionId, flowCard.getOrderNumber()); |
| | | //查询该订单未分架数量 |
| | | Integer FlowCount = flowCardMapper.SelectFlowCount(productionId); |
| | | Integer FlowCount = flowCardMapper.selectFlowCount(productionId); |
| | | if (FlowCount == 0) { |
| | | //修改订单表分架状态为2 |
| | | flowCardMapper.UpdateProcessingCard(productionId, 2); |
| | | flowCardMapper.updateProcessingCard(productionId, 2); |
| | | } else { |
| | | //修改订单表分架状态为1,未全部分架完成 |
| | | flowCardMapper.UpdateProcessingCard(productionId, 1); |
| | | flowCardMapper.updateProcessingCard(productionId, 1); |
| | | } |
| | | } |
| | | return true; |
| | |
| | | } |
| | | } |
| | | |
| | | public Map<String, Object> SelectSchedulingSv(String selectTime1, String selectTime2, String orderId,String processes, Integer state, FlowCard flowCard) { |
| | | public Map<String, Object> selectSchedulingSv(String selectTime1, String selectTime2, String orderId,String processes, Integer state, FlowCard flowCard) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | if (state==2){//已排产 |
| | | map.put("data", flowCardMapper.SelectOkSchedulingMp(selectTime1, selectTime2,orderId,processes, flowCard)); |
| | | map.put("data", flowCardMapper.selectOkSchedulingMp(selectTime1, selectTime2,orderId,processes, flowCard)); |
| | | |
| | | }else if (state==1){//未排产 |
| | | map.put("data", flowCardMapper.SelectNoSchedulingMp(selectTime1, selectTime2,orderId,processes, flowCard)); |
| | | map.put("data", flowCardMapper.selectNoSchedulingMp(selectTime1, selectTime2,orderId,processes, flowCard)); |
| | | |
| | | } |
| | | |
| | |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.dynamic.datasource.annotation.DS; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.example.erp.entity.pp.ProductionScheduling; |
| | | import com.example.erp.entity.sd.OrderDetail; |
| | | import com.example.erp.mapper.pp.ProductionSchedulingMapper; |
| | |
| | | } |
| | | |
| | | //带订单号查询 |
| | | public Map<String, Object> SelectSchedulingNotSv(String selectTime1, String selectTime2, String orderId, String processes, Integer state, ProductionScheduling productionScheduling) { |
| | | public Map<String, Object> selectSchedulingNotSv(String selectTime1, String selectTime2, String orderId, String processes, Integer state, ProductionScheduling productionScheduling) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("data", productionSchedulingMapper.SelectSchedulingNotMp(selectTime1, selectTime2,orderId,processes, productionScheduling)); |
| | | map.put("data", productionSchedulingMapper.selectSchedulingNotMp(selectTime1, selectTime2,orderId,processes, productionScheduling)); |
| | | return map; |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | } |
| | | |
| | | public boolean deleteSchedulingSv(Map<String, Object> object) throws Exception { |
| | | JSONObject objJson = new JSONObject(object); |
| | | List<ProductionScheduling> Scheduling = JSONArray.parseArray(JSONObject.toJSONString(objJson.get("scheduling")), ProductionScheduling.class); |
| | | if (!Scheduling.isEmpty()) { |
| | | for (ProductionScheduling productionScheduling : Scheduling) { |
| | | productionSchedulingMapper.deleteSchedulingMp(productionScheduling.getSchedulingId()); |
| | | // System.out.println(productionScheduling.getOrderNumber()+"***"+productionScheduling.getOrderId()); |
| | | } |
| | | return true; |
| | | } |
| | | else { |
| | | return false; |
| | | } |
| | | } |
| | | |
| | | public boolean ExamineSchedulingSv(Map<String, Object> object) { |
| | | String userName = ""; |
| | | if (object.get("userName") != null) { |
| | | userName = object.get("userName").toString(); |
| | | } |
| | | List<ProductionScheduling> schedulinglist = JSONArray.parseArray(JSONObject.toJSONString(object.get("scheduling")), ProductionScheduling.class); |
| | | |
| | | if (!schedulinglist.isEmpty()) { |
| | | for (ProductionScheduling productionScheduling : schedulinglist) { |
| | | productionSchedulingMapper.ExamineSchedulingMp(productionScheduling.getSchedulingId(),userName); |
| | | // System.out.println(productionScheduling.getOrderNumber()+"***"+productionScheduling.getOrderId()); |
| | | } |
| | | return true; |
| | | } |
| | | else { |
| | | return false; |
| | | } |
| | | } |
| | | } |
| | |
| | | import com.example.erp.service.userInfo.SysErrorService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.transaction.interceptor.TransactionAspectSupport; |
| | | |
| | | import java.text.SimpleDateFormat; |
| | |
| | | |
| | | @Service |
| | | @DS("pp") |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public class ReplenishService { |
| | | @Autowired |
| | | PatchLogMapper patchMapper; |
| | |
| | | |
| | | public Boolean updateReplenish(Map<String,Object> object) { |
| | | boolean saveState = true; |
| | | |
| | | String userName = ""; |
| | | String userId = ""; |
| | | if (object.get("userName") != null) { |
| | | userName = object.get("userName").toString(); |
| | | } |
| | | if (object.get("userId") != null) { |
| | | userId = object.get("userId").toString(); |
| | | } |
| | | //获取对象集合循环进行新增修改 |
| | | List<PatchLog> patchLoglist = JSONArray.parseArray(JSONObject.toJSONString(object.get("patchLog")), PatchLog.class); |
| | | if (!patchLoglist.isEmpty()){ |
| | | for (PatchLog patchLog : patchLoglist) { |
| | | //审核 |
| | | patchMapper.updateReplenish(patchLog,userName); |
| | | Object savePoint = TransactionAspectSupport.currentTransactionStatus().createSavepoint(); |
| | | try { |
| | | String userName = ""; |
| | | String userId = ""; |
| | | if (object.get("userName") != null) { |
| | | userName = object.get("userName").toString(); |
| | | } |
| | | } |
| | | if (object.get("userId") != null) { |
| | | userId = object.get("userId").toString(); |
| | | } |
| | | //获取对象集合循环进行新增修改 |
| | | List<PatchLog> patchLoglist = JSONArray.parseArray(JSONObject.toJSONString(object.get("patchLog")), PatchLog.class); |
| | | if (!patchLoglist.isEmpty()){ |
| | | for (PatchLog patchLog : patchLoglist) { |
| | | //审核 |
| | | patchMapper.updateReplenish(patchLog,userName); |
| | | //修改小片流程卡数量 |
| | | patchMapper.updateOrderProcessDetail(patchLog); |
| | | } |
| | | } |
| | | |
| | | } catch (Exception e) { |
| | | TransactionAspectSupport.currentTransactionStatus().rollbackToSavepoint(savePoint); |
| | | //将异常传入数据库 |
| | | SysError sysError = new SysError(); |
| | | sysError.setError(e.toString()); |
| | | sysError.setFunc("saveOrder"); |
| | | sysErrorService.insert(sysError); |
| | | saveState = false; |
| | | |
| | | } |
| | | |
| | | return saveState; |
| | | |
| | |
| | | import com.example.erp.service.userInfo.SysErrorService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.transaction.interceptor.TransactionAspectSupport; |
| | | |
| | | import java.text.SimpleDateFormat; |
| | |
| | | |
| | | @Service |
| | | @DS("pp") |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public class ReworkService { |
| | | @Autowired |
| | | ReworkMapper reworkMapper; |
| | |
| | | return map; |
| | | } |
| | | |
| | | public Map<String, Object> AddDateWork(String orderId, OrderDetail orderDetail) { |
| | | public Map<String, Object> addDateWork(String orderId, OrderDetail orderDetail) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | |
| | | map.put("data", workOrderMapper.addWordOrder(orderId, orderDetail)); |
| | | return map; |
| | | } |
| | | |
| | | public Boolean AddOrderWorkSv(Map<String, Object> object) { |
| | | public Boolean addOrderWorkSv(Map<String, Object> object) { |
| | | String userName = ""; |
| | | if (object.get("userName") != null) { |
| | | userName = object.get("userName").toString(); |
| | |
| | | productIdVl = orderID + letters; |
| | | //查询生成的生产订单号是否存在 |
| | | |
| | | Integer workCount = workOrderMapper.SelectOrderNumber(productIdVl); |
| | | Integer workCount = workOrderMapper.selectOrderNumber(productIdVl); |
| | | if (workCount < 1 ) { |
| | | break; |
| | | } |
| | |
| | | } |
| | | |
| | | //添加生产订单 |
| | | workOrderMapper.AddOrderWorkMp(productIdVl, orderDetail.getOrderId(), orderDetail.getProductId(), orderDetail.getProductName(), userName); |
| | | workOrderMapper.addOrderWorkMp(productIdVl, orderDetail.getOrderId(), orderDetail.getProductId(), orderDetail.getProductName(), userName); |
| | | Integer State = 2; |
| | | Integer States = 1; |
| | | //查询该订单未转生产订单的条数 |
| | | Integer NoWorkCount = workOrderMapper.SelectWorkCount(orderDetail.getOrderId()); |
| | | Integer NoWorkCount = workOrderMapper.selectWorkCount(orderDetail.getOrderId()); |
| | | if (NoWorkCount == 0) { |
| | | //条数为0修改转生产订单状态为2,否则为1 |
| | | workOrderMapper.UpdateWorkType(orderDetail.getOrderId(), State); |
| | | workOrderMapper.updateWorkType(orderDetail.getOrderId(), State); |
| | | } else { |
| | | workOrderMapper.UpdateWorkType(orderDetail.getOrderId(), States); |
| | | workOrderMapper.updateWorkType(orderDetail.getOrderId(), States); |
| | | } |
| | | } |
| | | |
| | |
| | | |
| | | } |
| | | |
| | | public Boolean DeleteOrderWorkSv(String orderId, String productName) { |
| | | public Boolean deleteOrderWorkSv(String orderId, String productName) { |
| | | if (!orderId.isEmpty() && !productName.isEmpty()) { |
| | | workOrderMapper.DeleteOrderWorkMp(orderId, productName); |
| | | workOrderMapper.deleteOrderWorkMp(orderId, productName); |
| | | Integer State = 0; |
| | | Integer States = 1; |
| | | Integer NoWorkCount = workOrderMapper.SelectWorkCount(orderId); |
| | | Integer YesWorkCount = workOrderMapper.SelectYesWorkCount(orderId); |
| | | Integer NoWorkCount = workOrderMapper.selectWorkCount(orderId); |
| | | Integer YesWorkCount = workOrderMapper.selectYesWorkCount(orderId); |
| | | if (NoWorkCount ==YesWorkCount) { |
| | | workOrderMapper.UpdateWorkType(orderId, State); |
| | | workOrderMapper.updateWorkType(orderId, State); |
| | | } else { |
| | | workOrderMapper.UpdateWorkType(orderId, States); |
| | | workOrderMapper.updateWorkType(orderId, States); |
| | | } |
| | | return true; |
| | | } else { |
| | |
| | | </if> |
| | | |
| | | |
| | | group by a.process_Id; |
| | | group by a.process_Id |
| | | ORDER BY a.id desc |
| | | limit #{offset},#{pageSize}; |
| | | </select> |
| | | |
| | | |
| | | <select id="getPageTotal"> |
| | | select |
| | | CEILING(count(a.process_Id)/#{pageSize}) as 'pageTotal', |
| | | count(distinct a.process_Id) as 'total' |
| | | from flow_card as a left join sd.`order` as b on a.order_Id=b.order_id |
| | | left join sd.order_detail as c on a.order_Id=c.order_id and a.order_Number=c.order_number |
| | | where a.create_time between #{selectTime1} and #{selectTime2} |
| | | <if test="flowCard.orderId != null and flowCard.orderId != ''"> |
| | | and a.order_id regexp #{flowCard.orderId} |
| | | </if> |
| | | <if test="flowCard.productionId != null and flowCard.productionId != ''"> |
| | | and a.process_Id regexp #{flowCard.productionId} |
| | | </if> |
| | | <if test="flowCard.orderDetail.productId != null and flowCard.orderDetail.productId != ''"> |
| | | and c.product_id regexp #{flowCard.orderDetail.productId} |
| | | </if> |
| | | <if test="flowCard.orderDetail.productName != null and flowCard.orderDetail.productName!= ''"> |
| | | and c.product_name regexp #{flowCard.orderDetail.productName} |
| | | </if> |
| | | |
| | | <if test="flowCard.order.project != null and flowCard.order.project!= ''"> |
| | | and b.project regexp #{flowCard.order.project} |
| | | </if> |
| | | |
| | | |
| | | limit #{offset},#{pageSize}; |
| | | </select> |
| | | |
| | | <!--分架查询--> |
| | |
| | | </select> |
| | | |
| | | <!-- 分架明细查询--> |
| | | <select id="DetailsSelectMp" resultMap="flowCardMap"> |
| | | <select id="detailsSelectMp" resultMap="flowCardMap"> |
| | | select od.order_id, |
| | | ogd.production_id, |
| | | od.product_id, |
| | |
| | | </select> |
| | | |
| | | <!-- 更新分架状态--> |
| | | <update id="UpdateDeleteState"> |
| | | <update id="updateDeleteState"> |
| | | update |
| | | sd.order_glass_detail as ogd left join flow_card as fc |
| | | on ogd.order_id=fc.order_id and ogd.order_number=fc.order_number |
| | |
| | | </update> |
| | | |
| | | <!-- 删除流程卡--> |
| | | <update id="DeleteFlowCardMp"> |
| | | <update id="deleteFlowCardMp"> |
| | | delete from flow_card as fc where fc.process_id=#{processId} |
| | | </update> |
| | | |
| | | <!-- 分架新增明细查询--> |
| | | |
| | | <!--resultMap="flowCardMap"--> |
| | | <select id="SelectNoCardMp" > |
| | | <select id="selectNoCardMp" > |
| | | |
| | | select |
| | | od.order_number, |
| | |
| | | </select> |
| | | |
| | | <!--修改排版状态--> |
| | | <update id="UpdateLayoutStatusMp"> |
| | | <update id="updateLayoutStatusMp"> |
| | | update flow_card as fc |
| | | set fc.layout_status=2 |
| | | where fc.process_id = #{processId} |
| | | </update> |
| | | |
| | | <!-- 查询对应流程卡号排版状态--> |
| | | <select id="SelectLayoutStatus"> |
| | | <select id="selectLayoutStatus"> |
| | | select fc.layout_status |
| | | from flow_card as fc |
| | | where fc.process_id = #{processId} |
| | |
| | | </select> |
| | | |
| | | <!-- 查询报工表内是否有对应流程卡--> |
| | | <select id="ReportingWorkCount"> |
| | | <select id="reportingWorkCount"> |
| | | select COUNT(rw.process_id) |
| | | from reporting_work as rw |
| | | where rw.process_id = #{processId} |
| | | </select> |
| | | <!-- 插入Flow_card表--> |
| | | <insert id="AddFlowCardMp"> |
| | | <insert id="addFlowCardMp"> |
| | | insert into |
| | | flow_card ( |
| | | order_id, |
| | |
| | | </insert> |
| | | |
| | | <!-- 更新分架状态--> |
| | | <update id="UpdateFlowState"> |
| | | <update id="updateFlowState"> |
| | | update sd.order_glass_detail as ogd |
| | | set ogd.splitting_status=1 |
| | | where ogd.production_id=#{productionId} and ogd.order_number=#{orderNumber} |
| | | </update> |
| | | <!-- 查询未分架的条数--> |
| | | <select id="SelectFlowCount"> |
| | | <select id="selectFlowCount"> |
| | | select COUNT(*) |
| | | from sd.order_glass_detail as ogd |
| | | where ogd.order_id = left(#{productionId},10) |
| | | and ogd.splitting_status = 0 |
| | | </select> |
| | | <!-- 修改订单表分架状态--> |
| | | <update id="UpdateProcessingCard"> |
| | | <update id="updateProcessingCard"> |
| | | update sd.`order` as o |
| | | set o.processing_card=#{state} |
| | | where o.order_id=left(#{productionId},10) |
| | | </update> |
| | | |
| | | <!-- 查询已排版数据--> |
| | | <select id="SelectOkSchedulingMp"> |
| | | <select id="selectOkSchedulingMp"> |
| | | select od.order_id,o.customer_name,o.project,od.order_number,od.width,od.height,od.quantity, |
| | | round(od.width*od.height*od.quantity/1000000,2), |
| | | (od.quantity-IFNULL(ps.scheduling_quantity,0)), |
| | |
| | | |
| | | </select> |
| | | <!-- 查询未排版数据--> |
| | | <select id="SelectNoSchedulingMp"> |
| | | <select id="selectNoSchedulingMp"> |
| | | |
| | | </select> |
| | | <!-- 首次查询排版数据--> |
| | |
| | | </select> |
| | | |
| | | <!-- 查询对应序号的层数--> |
| | | <select id="SelectLayer"> |
| | | <select id="selectLayer"> |
| | | select COUNT(ogd.order_number) |
| | | from sd.order_glass_detail as ogd |
| | | where ogd.production_id = #{productionId} |
| | |
| | | update pp.patch_log set reviewer=#{userName},review_status=1,update_time=now() where id=#{patchLog.id} |
| | | </update> |
| | | |
| | | <update id="updateOrderProcessDetail" > |
| | | update sd.order_process_detail set reporting_work_num=reporting_work_num-#{patchLog.patchNum} where order_id=#{patchLog.orderId} and |
| | | order_number=#{patchLog.orderSort} and technology_number=#{patchLog.technologyNumber} and id <![CDATA[<]]> (select a.opdid from(select id as opdid from |
| | | sd.order_process_detail opd where opd.order_id=#{patchLog.orderId} and opd.order_number=#{patchLog.orderSort} and opd.technology_number=#{patchLog.technologyNumber} |
| | | and process=#{patchLog.patchProcesses}) as a) |
| | | </update> |
| | | |
| | | <update id="updateDamageDetails" > |
| | | update pp.damage_details set quantity=quantity+#{patchLog.patchNum},patch_status=1 where id=#{patchLog.reviewer} |
| | | </update> |
| | |
| | | left join (select * from sd.order_glass_detail group by order_id,order_number) as ogd |
| | | on rw.order_id = ogd.order_id and dd.order_number = ogd.order_number |
| | | |
| | | where dd.breakage_quantity-dd.quantity>0 and dd.available=0 |
| | | where dd.breakage_quantity-dd.quantity>0 and dd.available=0 and (dd.responsible_process=rw.this_process or (dd.responsible_process!=rw.this_process and dd.qualityIns_status=1)) |
| | | |
| | | </select> |
| | | |
| | |
| | | <result column="scheduling_quantity" property="schedulingQuantity"/> |
| | | <result column="order_number" property="orderNumber"/> |
| | | <result column="scheduling_id" property="schedulingId"/> |
| | | <result column="order_id" property="orderId"/> |
| | | <!--接收其他外键实体类数据--> |
| | | <association property="order" javaType="com.example.erp.entity.sd.Order"> |
| | | <result column="project" property="project"/> |
| | |
| | | left join production_scheduling as ps on ps.order_id=od.order_id and ps.order_number=od.order_number |
| | | where ps.scheduling_id IS NOT NULL |
| | | and od.create_time between #{selectTime1} and #{selectTime2} |
| | | |
| | | and position(#{processes} in ps.processes) |
| | | and position(#{orderId} in ps.order_id) |
| | | |
| | | </select> |
| | | |
| | | <!-- 查询已排产带订单编号的数据--> |
| | | <select id="SelectSchedulingNotMp"> |
| | | <select id="selectSchedulingNotMp"> |
| | | select date(ps.scheduled_start_time) as scheduled_start_time, |
| | | date(ps.plan_end_time) as plan_end_time, |
| | | od.order_id,o.customer_name,o.project,od.order_number,od.width,od.height,od.quantity, |
| | |
| | | <select id="selectLastSchedulingMp"> |
| | | select od.order_id,o.customer_name,o.project,od.order_number,od.width,od.height,od.quantity, |
| | | round(od.width*od.height*od.quantity/1000000,2) as area, |
| | | (od.quantity-IFNULL(ps.scheduling_quantity,0)) as pendingProductionQuantity, |
| | | round(od.width*od.height*(od.quantity-IFNULL(ps.scheduling_quantity,0))/1000000,2) as pendingProductionArea, |
| | | IFNULL(ps.scheduling_quantity,0) as productionScheduledQuantity, |
| | | round(od.width*od.height*(IFNULL(ps.scheduling_quantity,0))/1000000,2) as productionScheduledArea, |
| | | (od.quantity-IFNULL(sum(ps.scheduling_quantity),0)) as pendingProductionQuantity, |
| | | round(od.width*od.height*(od.quantity-IFNULL(sum(ps.scheduling_quantity),0))/1000000,2) as pendingProductionArea, |
| | | IFNULL(sum(ps.scheduling_quantity),0) as productionScheduledQuantity, |
| | | round(od.width*od.height*(IFNULL(sum(ps.scheduling_quantity),0))/1000000,2) as productionScheduledArea, |
| | | od.product_name,od.shape |
| | | from sd.order_detail as od left join sd.order as o on od.order_id=o.order_id |
| | | left join production_scheduling as ps on ps.order_id=od.order_id and ps.order_number=od.order_number |
| | | where od.create_time between #{selectTime1} and #{selectTime2} and od.quantity-IFNULL(ps.scheduling_quantity,0)>0 |
| | | group by od.order_id,od.order_number |
| | | </select> |
| | | |
| | | <select id="selectMaxId"> |
| | |
| | | now() |
| | | ) |
| | | </insert> |
| | | |
| | | <update id="ExamineSchedulingMp"> |
| | | update production_scheduling set review_status=1,reviewer=#{userName} where |
| | | scheduling_id=#{schedulingId} |
| | | </update> |
| | | |
| | | <delete id="deleteSchedulingMp"> |
| | | delete from production_scheduling where scheduling_id=#{schedulingId} |
| | | </delete> |
| | | </mapper> |
| | |
| | | left join (select * from sd.order_glass_detail group by order_id,order_number) as ogd |
| | | on rw.order_id = ogd.order_id and dd.order_number = ogd.order_number |
| | | |
| | | where dd.breakage_quantity-dd.quantity>0 and dd.available=1 |
| | | where dd.breakage_quantity-dd.quantity>0 and dd.available=1 and dd.qualityIns_status=1 |
| | | |
| | | </select> |
| | | |
| | |
| | | ; |
| | | </select> |
| | | |
| | | <select id="SelectOrderNumber" > |
| | | <select id="selectOrderNumber" > |
| | | select ifnull(count(ogd.production_id),0) |
| | | from sd.order_glass_detail as ogd |
| | | where ogd.production_id = #{productIdVl} |
| | | </select> |
| | | |
| | | <update id="AddOrderWorkMp" > |
| | | <update id="addOrderWorkMp" > |
| | | update sd.order_detail as od left join sd.order_glass_detail as ogd |
| | | on od.order_id = ogd.order_id and od.order_number = ogd.order_number |
| | | |
| | |
| | | </update> |
| | | |
| | | <!-- 删除工单--> |
| | | <update id="DeleteOrderWorkMp"> |
| | | <update id="deleteOrderWorkMp"> |
| | | update sd.order_detail as od left join sd.order_glass_detail as ogd |
| | | on od.order_id = ogd.order_id and od.order_number = ogd.order_number |
| | | set ogd.production_id=null, |
| | |
| | | and od.product_name = #{productName} |
| | | </update> |
| | | |
| | | <select id="SelectWorkCount"> |
| | | <select id="selectWorkCount"> |
| | | select COUNT(distinct order_number) |
| | | from order_glass_detail |
| | | where ISNULL(production_id) |
| | | and order_id = #{orderId} |
| | | </select> |
| | | |
| | | <select id="SelectYesWorkCount"> |
| | | <select id="selectYesWorkCount"> |
| | | select COUNT(distinct order_number) |
| | | from order_glass_detail |
| | | where order_id = #{orderId} |
| | | </select> |
| | | |
| | | <update id="UpdateWorkType"> |
| | | <update id="updateWorkType"> |
| | | update sd.order as o set o.production_order=#{state} where o.order_id=#{orderId} |
| | | </update> |
| | | </mapper> |
| | |
| | | </if> |
| | | |
| | | |
| | | group by a.process_Id; |
| | | group by a.process_Id |
| | | ORDER BY a.id desc |
| | | limit #{offset},#{pageSize}; |
| | | </select> |
| | | |
| | | |
| | | <select id="getPageTotal"> |
| | | select |
| | | CEILING(count(a.process_Id)/#{pageSize}) as 'pageTotal', |
| | | count(distinct a.process_Id) as 'total' |
| | | from flow_card as a left join sd.`order` as b on a.order_Id=b.order_id |
| | | left join sd.order_detail as c on a.order_Id=c.order_id and a.order_Number=c.order_number |
| | | where a.create_time between #{selectTime1} and #{selectTime2} |
| | | <if test="flowCard.orderId != null and flowCard.orderId != ''"> |
| | | and a.order_id regexp #{flowCard.orderId} |
| | | </if> |
| | | <if test="flowCard.productionId != null and flowCard.productionId != ''"> |
| | | and a.process_Id regexp #{flowCard.productionId} |
| | | </if> |
| | | <if test="flowCard.orderDetail.productId != null and flowCard.orderDetail.productId != ''"> |
| | | and c.product_id regexp #{flowCard.orderDetail.productId} |
| | | </if> |
| | | <if test="flowCard.orderDetail.productName != null and flowCard.orderDetail.productName!= ''"> |
| | | and c.product_name regexp #{flowCard.orderDetail.productName} |
| | | </if> |
| | | |
| | | <if test="flowCard.order.project != null and flowCard.order.project!= ''"> |
| | | and b.project regexp #{flowCard.order.project} |
| | | </if> |
| | | |
| | | |
| | | limit #{offset},#{pageSize}; |
| | | </select> |
| | | |
| | | <!--分架查询--> |
| | |
| | | </select> |
| | | |
| | | <!-- 分架明细查询--> |
| | | <select id="DetailsSelectMp" resultMap="flowCardMap"> |
| | | <select id="detailsSelectMp" resultMap="flowCardMap"> |
| | | select od.order_id, |
| | | ogd.production_id, |
| | | od.product_id, |
| | |
| | | </select> |
| | | |
| | | <!-- 更新分架状态--> |
| | | <update id="UpdateDeleteState"> |
| | | <update id="updateDeleteState"> |
| | | update |
| | | sd.order_glass_detail as ogd left join flow_card as fc |
| | | on ogd.order_id=fc.order_id and ogd.order_number=fc.order_number |
| | |
| | | </update> |
| | | |
| | | <!-- 删除流程卡--> |
| | | <update id="DeleteFlowCardMp"> |
| | | <update id="deleteFlowCardMp"> |
| | | delete from flow_card as fc where fc.process_id=#{processId} |
| | | </update> |
| | | |
| | | <!-- 分架新增明细查询--> |
| | | |
| | | <!--resultMap="flowCardMap"--> |
| | | <select id="SelectNoCardMp" > |
| | | <select id="selectNoCardMp" > |
| | | |
| | | select |
| | | od.order_number, |
| | |
| | | </select> |
| | | |
| | | <!--修改排版状态--> |
| | | <update id="UpdateLayoutStatusMp"> |
| | | <update id="updateLayoutStatusMp"> |
| | | update flow_card as fc |
| | | set fc.layout_status=2 |
| | | where fc.process_id = #{processId} |
| | | </update> |
| | | |
| | | <!-- 查询对应流程卡号排版状态--> |
| | | <select id="SelectLayoutStatus"> |
| | | <select id="selectLayoutStatus"> |
| | | select fc.layout_status |
| | | from flow_card as fc |
| | | where fc.process_id = #{processId} |
| | |
| | | </select> |
| | | |
| | | <!-- 查询报工表内是否有对应流程卡--> |
| | | <select id="ReportingWorkCount"> |
| | | <select id="reportingWorkCount"> |
| | | select COUNT(rw.process_id) |
| | | from reporting_work as rw |
| | | where rw.process_id = #{processId} |
| | | </select> |
| | | <!-- 插入Flow_card表--> |
| | | <insert id="AddFlowCardMp"> |
| | | <insert id="addFlowCardMp"> |
| | | insert into |
| | | flow_card ( |
| | | order_id, |
| | |
| | | </insert> |
| | | |
| | | <!-- 更新分架状态--> |
| | | <update id="UpdateFlowState"> |
| | | <update id="updateFlowState"> |
| | | update sd.order_glass_detail as ogd |
| | | set ogd.splitting_status=1 |
| | | where ogd.production_id=#{productionId} and ogd.order_number=#{orderNumber} |
| | | </update> |
| | | <!-- 查询未分架的条数--> |
| | | <select id="SelectFlowCount"> |
| | | <select id="selectFlowCount"> |
| | | select COUNT(*) |
| | | from sd.order_glass_detail as ogd |
| | | where ogd.order_id = left(#{productionId},10) |
| | | and ogd.splitting_status = 0 |
| | | </select> |
| | | <!-- 修改订单表分架状态--> |
| | | <update id="UpdateProcessingCard"> |
| | | <update id="updateProcessingCard"> |
| | | update sd.`order` as o |
| | | set o.processing_card=#{state} |
| | | where o.order_id=left(#{productionId},10) |
| | | </update> |
| | | |
| | | <!-- 查询已排版数据--> |
| | | <select id="SelectOkSchedulingMp"> |
| | | <select id="selectOkSchedulingMp"> |
| | | select od.order_id,o.customer_name,o.project,od.order_number,od.width,od.height,od.quantity, |
| | | round(od.width*od.height*od.quantity/1000000,2), |
| | | (od.quantity-IFNULL(ps.scheduling_quantity,0)), |
| | |
| | | |
| | | </select> |
| | | <!-- 查询未排版数据--> |
| | | <select id="SelectNoSchedulingMp"> |
| | | <select id="selectNoSchedulingMp"> |
| | | |
| | | </select> |
| | | <!-- 首次查询排版数据--> |
| | |
| | | </select> |
| | | |
| | | <!-- 查询对应序号的层数--> |
| | | <select id="SelectLayer"> |
| | | <select id="selectLayer"> |
| | | select COUNT(ogd.order_number) |
| | | from sd.order_glass_detail as ogd |
| | | where ogd.production_id = #{productionId} |
| | |
| | | update pp.patch_log set reviewer=#{userName},review_status=1,update_time=now() where id=#{patchLog.id} |
| | | </update> |
| | | |
| | | <update id="updateOrderProcessDetail" > |
| | | update sd.order_process_detail set reporting_work_num=reporting_work_num-#{patchLog.patchNum} where order_id=#{patchLog.orderId} and |
| | | order_number=#{patchLog.orderSort} and technology_number=#{patchLog.technologyNumber} and id <![CDATA[<]]> (select a.opdid from(select id as opdid from |
| | | sd.order_process_detail opd where opd.order_id=#{patchLog.orderId} and opd.order_number=#{patchLog.orderSort} and opd.technology_number=#{patchLog.technologyNumber} |
| | | and process=#{patchLog.patchProcesses}) as a) |
| | | </update> |
| | | |
| | | <update id="updateDamageDetails" > |
| | | update pp.damage_details set quantity=quantity+#{patchLog.patchNum},patch_status=1 where id=#{patchLog.reviewer} |
| | | </update> |
| | |
| | | left join (select * from sd.order_glass_detail group by order_id,order_number) as ogd |
| | | on rw.order_id = ogd.order_id and dd.order_number = ogd.order_number |
| | | |
| | | where dd.breakage_quantity-dd.quantity>0 and dd.available=0 |
| | | where dd.breakage_quantity-dd.quantity>0 and dd.available=0 and (dd.responsible_process=rw.this_process or (dd.responsible_process!=rw.this_process and dd.qualityIns_status=1)) |
| | | |
| | | </select> |
| | | |
| | |
| | | <result column="scheduling_quantity" property="schedulingQuantity"/> |
| | | <result column="order_number" property="orderNumber"/> |
| | | <result column="scheduling_id" property="schedulingId"/> |
| | | <result column="order_id" property="orderId"/> |
| | | <!--接收其他外键实体类数据--> |
| | | <association property="order" javaType="com.example.erp.entity.sd.Order"> |
| | | <result column="project" property="project"/> |
| | |
| | | left join production_scheduling as ps on ps.order_id=od.order_id and ps.order_number=od.order_number |
| | | where ps.scheduling_id IS NOT NULL |
| | | and od.create_time between #{selectTime1} and #{selectTime2} |
| | | |
| | | and position(#{processes} in ps.processes) |
| | | and position(#{orderId} in ps.order_id) |
| | | |
| | | </select> |
| | | |
| | | <!-- 查询已排产带订单编号的数据--> |
| | | <select id="SelectSchedulingNotMp"> |
| | | <select id="selectSchedulingNotMp"> |
| | | select date(ps.scheduled_start_time) as scheduled_start_time, |
| | | date(ps.plan_end_time) as plan_end_time, |
| | | od.order_id,o.customer_name,o.project,od.order_number,od.width,od.height,od.quantity, |
| | |
| | | <select id="selectLastSchedulingMp"> |
| | | select od.order_id,o.customer_name,o.project,od.order_number,od.width,od.height,od.quantity, |
| | | round(od.width*od.height*od.quantity/1000000,2) as area, |
| | | (od.quantity-IFNULL(ps.scheduling_quantity,0)) as pendingProductionQuantity, |
| | | round(od.width*od.height*(od.quantity-IFNULL(ps.scheduling_quantity,0))/1000000,2) as pendingProductionArea, |
| | | IFNULL(ps.scheduling_quantity,0) as productionScheduledQuantity, |
| | | round(od.width*od.height*(IFNULL(ps.scheduling_quantity,0))/1000000,2) as productionScheduledArea, |
| | | (od.quantity-IFNULL(sum(ps.scheduling_quantity),0)) as pendingProductionQuantity, |
| | | round(od.width*od.height*(od.quantity-IFNULL(sum(ps.scheduling_quantity),0))/1000000,2) as pendingProductionArea, |
| | | IFNULL(sum(ps.scheduling_quantity),0) as productionScheduledQuantity, |
| | | round(od.width*od.height*(IFNULL(sum(ps.scheduling_quantity),0))/1000000,2) as productionScheduledArea, |
| | | od.product_name,od.shape |
| | | from sd.order_detail as od left join sd.order as o on od.order_id=o.order_id |
| | | left join production_scheduling as ps on ps.order_id=od.order_id and ps.order_number=od.order_number |
| | | where od.create_time between #{selectTime1} and #{selectTime2} and od.quantity-IFNULL(ps.scheduling_quantity,0)>0 |
| | | group by od.order_id,od.order_number |
| | | </select> |
| | | |
| | | <select id="selectMaxId"> |
| | |
| | | now() |
| | | ) |
| | | </insert> |
| | | |
| | | <update id="ExamineSchedulingMp"> |
| | | update production_scheduling set review_status=1,reviewer=#{userName} where |
| | | scheduling_id=#{schedulingId} |
| | | </update> |
| | | |
| | | <delete id="deleteSchedulingMp"> |
| | | delete from production_scheduling where scheduling_id=#{schedulingId} |
| | | </delete> |
| | | </mapper> |
| | |
| | | left join (select * from sd.order_glass_detail group by order_id,order_number) as ogd |
| | | on rw.order_id = ogd.order_id and dd.order_number = ogd.order_number |
| | | |
| | | where dd.breakage_quantity-dd.quantity>0 and dd.available=1 |
| | | where dd.breakage_quantity-dd.quantity>0 and dd.available=1 and dd.qualityIns_status=1 |
| | | |
| | | </select> |
| | | |
| | |
| | | ; |
| | | </select> |
| | | |
| | | <select id="SelectOrderNumber" > |
| | | <select id="selectOrderNumber" > |
| | | select ifnull(count(ogd.production_id),0) |
| | | from sd.order_glass_detail as ogd |
| | | where ogd.production_id = #{productIdVl} |
| | | </select> |
| | | |
| | | <update id="AddOrderWorkMp" > |
| | | <update id="addOrderWorkMp" > |
| | | update sd.order_detail as od left join sd.order_glass_detail as ogd |
| | | on od.order_id = ogd.order_id and od.order_number = ogd.order_number |
| | | |
| | |
| | | </update> |
| | | |
| | | <!-- 删除工单--> |
| | | <update id="DeleteOrderWorkMp"> |
| | | <update id="deleteOrderWorkMp"> |
| | | update sd.order_detail as od left join sd.order_glass_detail as ogd |
| | | on od.order_id = ogd.order_id and od.order_number = ogd.order_number |
| | | set ogd.production_id=null, |
| | |
| | | and od.product_name = #{productName} |
| | | </update> |
| | | |
| | | <select id="SelectWorkCount"> |
| | | <select id="selectWorkCount"> |
| | | select COUNT(distinct order_number) |
| | | from order_glass_detail |
| | | where ISNULL(production_id) |
| | | and order_id = #{orderId} |
| | | </select> |
| | | |
| | | <select id="SelectYesWorkCount"> |
| | | <select id="selectYesWorkCount"> |
| | | select COUNT(distinct order_number) |
| | | from order_glass_detail |
| | | where order_id = #{orderId} |
| | | </select> |
| | | |
| | | <update id="UpdateWorkType"> |
| | | <update id="updateWorkType"> |
| | | update sd.order as o set o.production_order=#{state} where o.order_id=#{orderId} |
| | | </update> |
| | | </mapper> |