| | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.dynamic.datasource.annotation.DS; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; |
| | | import com.example.erp.entity.pp.FlowCard; |
| | | import com.example.erp.entity.sd.OrderGlassDetail; |
| | | import com.example.erp.entity.sd.OrderProcessDetail; |
| | |
| | | |
| | | |
| | | } |
| | | |
| | | public List<FlowCard> getProcessCard() { |
| | | List<FlowCard> flowCardList = flowCardMapper.selectList( |
| | | new QueryWrapper<FlowCard>().eq("termination_status", 0) |
| | | .orderByDesc("id") |
| | | ); |
| | | for (FlowCard flowCard : flowCardList) { |
| | | flowCard.setProcessId(flowCard.getProcessId()+'/'+flowCard.getTechnologyNumber()); |
| | | flowCard.setOrderGlassDetail( |
| | | orderGlassDetailMapper.selectOne( |
| | | new QueryWrapper<OrderGlassDetail>() |
| | | .eq("order_id", flowCard.getOrderId()) |
| | | .eq("order_number", flowCard.getOrderNumber()) |
| | | .eq("technology_number", flowCard.getTechnologyNumber()) |
| | | ) |
| | | ); |
| | | String str = flowCard.getOrderGlassDetail().getGlassChild(); |
| | | String delimiter = "mm"; |
| | | int index = str.indexOf(delimiter); |
| | | Integer subString = Integer.valueOf(str.substring(0, index).trim()); |
| | | flowCard.getOrderGlassDetail().setThickness(subString); |
| | | } |
| | | return flowCardList; |
| | | } |
| | | |
| | | public Boolean updateProcessCardState(Integer id) { |
| | | UpdateWrapper<FlowCard> updateWrapper = new UpdateWrapper<>(); |
| | | updateWrapper.eq("id", id) // 根据id更新 |
| | | .set("termination_status", 1); |
| | | return flowCardMapper.update(null, updateWrapper) > 0; |
| | | } |
| | | } |
| | | |
| | | |