| | |
| | | <el-col :span="2"><el-text>计算方式:</el-text></el-col> |
| | | <el-col :span="2"> |
| | | <el-select v-model="titleUploadData.calculateType" clearable placeholder=" " > |
| | | <el-option value="1" label="1"/> |
| | | <el-option value="1" label="面积金额(单片)"/> |
| | | </el-select> |
| | | </el-col> |
| | | <el-col :span="2"><el-text>*业务员:</el-text></el-col> |
| | |
| | | },//表头参数 |
| | | columns:[ |
| | | {title: '操作', width: 110, slots: { default: 'button_slot' },fixed:"left",}, |
| | | {field: 'orderDetail.orderNumber',width:120, title: '序号',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'orderNumber',width:120, title: '序号',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | //{field: 'orderDetail.buildingNumber',width:120, title: '楼号',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'orderDetail.productName',width:120, title: '成品名称',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'glassAddress',width:120, title: '标记',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | |
| | | {field: 'orderDetail.edgingType',width:120, title: '磨边类型',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true} |
| | | ],//表头按钮 |
| | | mergeCells: [ |
| | | { row: 0, col: 1, rowspan: 4, colspan: 1 }, |
| | | /*{ row: 0, col: 1, rowspan: 4, colspan: 1 }, |
| | | { row: 0, col: 2, rowspan: 4, colspan: 1 }, |
| | | { row: 0, col: 4, rowspan: 4, colspan: 1 }, |
| | | { row: 0, col: 5, rowspan: 4, colspan: 1 }, |
| | | { row: 0, col: 6, rowspan: 4, colspan: 1 }, |
| | | { row: 0, col: 7, rowspan: 4, colspan: 1 }, |
| | | { row: 0, col: 8, rowspan: 4, colspan: 1 }, |
| | | { row: 0, col: 8, rowspan: 4, colspan: 1 },*/ |
| | | ], |
| | | toolbarConfig: { |
| | | buttons: [ |
| | |
| | | }) |
| | | }) |
| | | const reviewOrderCraft = (state) => { |
| | | request.post(`/order/reviewProcessById/${titleUploadData.value.orderId}/${state}`).then(res =>{ |
| | | |
| | | request.post(`/order/reviewProcessById/${titleUploadData.value.orderId}/${state}`,xGrid.value.getRecordset().updateRecords).then(res =>{ |
| | | if(res.code==200){ |
| | | gridOptions.toolbarConfig.buttons[2].disabled = true |
| | | if(state==2){ |
| | |
| | | import com.example.erp.common.Constants; |
| | | import com.example.erp.common.Result; |
| | | import com.example.erp.entity.sd.Order; |
| | | import com.example.erp.entity.sd.OrderGlassDetail; |
| | | import com.example.erp.exception.ServiceException; |
| | | import com.example.erp.service.sd.OrderService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | |
| | | |
| | | @PostMapping("/reviewProcessById/{id}/{status}") |
| | | public Result reviewProcessById(@PathVariable String id,@PathVariable Integer status) { |
| | | return Result.seccess(orderService.reviewProcessById(id,status)); |
| | | public Result reviewProcessById(@PathVariable String id,@PathVariable Integer status,@RequestBody List<OrderGlassDetail> orderGlassDetails) { |
| | | return Result.seccess(orderService.reviewProcessById(id,status,orderGlassDetails)); |
| | | } |
| | | } |
| | |
| | | |
| | | @TableField(value = "customer_id") |
| | | private Customer customer; |
| | | @TableField(select = false) |
| | | private FinishedGoodsInventory finishedGoodsInventory; |
| | | |
| | | } |
| | |
| | | @Mapper |
| | | public interface BasicDateMapper { |
| | | |
| | | List<BasicData> getOrderBasicData(); |
| | | List<String> getOrderBasicDataType(); |
| | | List<BasicData> getOrderBasicData(String type); |
| | | List<String> getOrderBasicDataType(String type); |
| | | } |
| | |
| | | List<OrderGlassDetail> selectOrderGlassDetail(@Param("orderId") String orderId); |
| | | |
| | | List<OrderGlassDetail> selectOrderGlassDetailByOrderId(@Param("orderId") String orderId); |
| | | |
| | | void updateSizeAndProcess(@Param("orderGlassDetails")List<OrderGlassDetail> orderGlassDetails); |
| | | } |
| | |
| | | //获取订单基本数据 |
| | | public Map<String, List<Object>> getOrderBasicData() { |
| | | //获取订单基本数据类型 |
| | | List<String> orderBasicDataType = basicDateMapper.getOrderBasicDataType(); |
| | | List<String> orderBasicDataType = basicDateMapper.getOrderBasicDataType("order"); |
| | | //获取订单基本数据 |
| | | List<BasicData> orderBasicData = basicDateMapper.getOrderBasicData(); |
| | | List<BasicData> orderBasicData = basicDateMapper.getOrderBasicData("order"); |
| | | //创建Map对象 |
| | | Map<String, List<Object>> orderBasicDataMap = new HashMap<>(); ; |
| | | //创建List对象 |
| | |
| | | map.put("selectDate",list); |
| | | return map; |
| | | } |
| | | |
| | | //删除订单 |
| | | public Integer deleteOrder(String id) { |
| | | return orderMapper.delete( |
| | | new QueryWrapper<Order>().eq("order_id",id) |
| | |
| | | map.put("orderDetails",orderDetails); |
| | | return map; |
| | | } |
| | | |
| | | //订单审核 |
| | | public boolean reviewOrderById(String id,Integer status) { |
| | | Order order = orderMapper.selectOne(new QueryWrapper<Order>().eq("order_id",id)); |
| | | if(order.getProcessReview()!=2){ |
| | |
| | | } |
| | | return orderMapper.reviewOrderById(id,status); |
| | | } |
| | | |
| | | public boolean reviewProcessById(String id, Integer status) { |
| | | return orderMapper.reviewProcessById(id,status); |
| | | //工艺审核界面审核更新数据 |
| | | public boolean reviewProcessById(String id, Integer status,List<OrderGlassDetail> orderGlassDetails) { |
| | | if(!orderGlassDetails.isEmpty() && status==2){ |
| | | orderGlassDetailMapper.updateSizeAndProcess(orderGlassDetails); |
| | | orderProcessDetailMapper.delete(new QueryWrapper<OrderProcessDetail>().eq("order_id",id)); |
| | | //查询订单小片表获取工艺传入小片工艺表 |
| | | List<OrderGlassDetail> orderGlassDetailList = orderGlassDetailMapper.selectOrderGlassDetail(id); |
| | | List<OrderProcessDetail> orderProcessDetailList = getOrderProcessDetails(orderGlassDetailList); |
| | | //赋值订单工艺表 |
| | | orderProcessDetailMapper.insertOrderProcessDetail(orderProcessDetailList); |
| | | } |
| | | |
| | | return orderMapper.reviewProcessById(id,status); |
| | | } |
| | | //工艺审核界面数据查询 |
| | | public Map<String,Object> getOrderCraftById(String id) { |
| | | Order order = orderMapper.selectOne(new QueryWrapper<Order>().eq("order_id",id)); |
| | | List<OrderGlassDetail> orderGlassDetails = orderGlassDetailMapper.selectOrderGlassDetailByOrderId(id); |
| | |
| | | password: beibo.123/ |
| | | driver-class-name: com.mysql.cj.jdbc.Driver |
| | | sd: |
| | | url: jdbc:mysql://10.153.19.150:3306/sd?serverTimezone=GMT%2b8 |
| | | url: jdbc:mysql://10.153.19.150:3306/sd?serverTimezone=GMT%2b8&allowMultiQueries=true |
| | | username: root |
| | | password: beibo.123/ |
| | | driver-class-name: com.mysql.cj.jdbc.Driver |
| | |
| | | * |
| | | from |
| | | basic_data as a |
| | | where a.basic_type='order' |
| | | where a.basic_type=#{type} |
| | | </select> |
| | | <select id="getOrderBasicDataType"> |
| | | select |
| | | a.basic_category |
| | | from |
| | | basic_data as a |
| | | where a.basic_type='order' |
| | | where a.basic_type=#{type} |
| | | group by a.basic_category |
| | | |
| | | </select> |
| | |
| | | <resultMap id="orderGlassDetailMap" type="com.example.erp.entity.sd.OrderGlassDetail" > |
| | | <id column="id" property="id"/> |
| | | <result column="order_id" property="orderId"/> |
| | | <result column="order_number" property="orderNumber"/> |
| | | <result column="glass_address" property="glassAddress"/> |
| | | <result column="technology_number" property="technologyNumber"/> |
| | | <result column="glass_child" property="glassChild"/> |
| | |
| | | <result column="process" property="process"/> |
| | | <!--接收其他外键实体类数据--> |
| | | <association property="orderDetail" javaType="com.example.erp.entity.sd.OrderDetail"> |
| | | <result column="order_number" property="orderNumber"/> |
| | | |
| | | <result column="building_number" property="buildingNumber"/> |
| | | |
| | | <result column="product_name" property="productName"/> |
| | |
| | | <select id="selectOrderGlassDetailByOrderId" resultMap="orderGlassDetailMap"> |
| | | select |
| | | a.order_id, |
| | | b.order_number, |
| | | a.order_number, |
| | | b.building_number, |
| | | b.product_name, |
| | | a.glass_address, |
| | |
| | | where a.order_id = #{orderId} |
| | | order by a.order_number,a.technology_number |
| | | </select> |
| | | |
| | | <update id="updateSizeAndProcess" parameterType="java.util.List"> |
| | | <foreach collection="orderGlassDetails" item="item" index="index" open="" close="" separator=";"> |
| | | update order_glass_detail |
| | | set |
| | | child_width = #{item.childWidth}, |
| | | child_height = #{item.childHeight}, |
| | | process = #{item.process} |
| | | where |
| | | order_id = #{item.orderId} |
| | | and order_number = #{item.orderNumber} |
| | | and technology_number = #{item.technologyNumber} |
| | | </foreach> |
| | | |
| | | </update> |
| | | </mapper> |
| | |
| | | </if> |
| | | |
| | | <if test="order.customerId != null and order.customerId != ''"> |
| | | and o.customer_id REGEXP #{customerId} |
| | | and o.customer_id REGEXP #{order.customerId} |
| | | </if> |
| | | <if test="order.customerName != null and order.customerName != ''"> |
| | | and o.customer_name REGEXP #{customerName} |
| | | and o.customer_name REGEXP #{order.customerName} |
| | | </if> |
| | | <if test="order.project != null and order.project != ''"> |
| | | and o.project REGEXP #{order.project} |
| | |
| | | </if> |
| | | |
| | | <if test="order.area != null and order.area != ''"> |
| | | and o.area REGEXP #{order.area} |
| | | and o.area REGEXP REGEXP_REPLACE(#{order.area}, '\\.0+$', '') |
| | | </if> |
| | | <if test="order.createTime != null and order.createTime != ''"> |
| | | and date(o.create_time) = #{order.createTime} |
| | |
| | | </if> |
| | | |
| | | <if test="order.customerId != null and order.customerId != ''"> |
| | | and o.customer_id REGEXP #{customerId} |
| | | and o.customer_id REGEXP #{order.customerId} |
| | | </if> |
| | | <if test="order.customerName != null and order.customerName != ''"> |
| | | and o.customer_name REGEXP #{customerName} |
| | | and o.customer_name REGEXP #{order.customerName} |
| | | </if> |
| | | <if test="order.project != null and order.project != ''"> |
| | | and o.project REGEXP #{order.project} |
| | |
| | | |
| | | @Test |
| | | void contextLoads() { |
| | | String.valueOf("1.0").replaceAll("\\.0*$|(\\.\\d*?)0+$", "$1"); |
| | | } |
| | | |
| | | } |
| | |
| | | |
| | | @Test |
| | | void testCreateOrder() { |
| | | List<LocalDate> a = new ArrayList<>(); |
| | | a.add(LocalDate.now().minusDays(15)); |
| | | a.add(LocalDate.now().plusDays(1)); |
| | | Order order = new Order(); |
| | | orderService.getOrderList(1,100,a,order,null); |
| | | System.out.println(String.valueOf("2.10").replaceAll("\\.0*$|(\\.\\d*?)0+$", "$1")); |
| | | // List<LocalDate> a = new ArrayList<>(); |
| | | // a.add(LocalDate.now().minusDays(15)); |
| | | // a.add(LocalDate.now().plusDays(1)); |
| | | // Order order = new Order(); |
| | | // orderService.getOrderList(1,100,a,order,null); |
| | | } |
| | | |
| | | } |
| | |
| | | password: beibo.123/ |
| | | driver-class-name: com.mysql.cj.jdbc.Driver |
| | | sd: |
| | | url: jdbc:mysql://10.153.19.150:3306/sd?serverTimezone=GMT%2b8 |
| | | url: jdbc:mysql://10.153.19.150:3306/sd?serverTimezone=GMT%2b8&allowMultiQueries=true |
| | | username: root |
| | | password: beibo.123/ |
| | | driver-class-name: com.mysql.cj.jdbc.Driver |
| | |
| | | * |
| | | from |
| | | basic_data as a |
| | | where a.basic_type='order' |
| | | where a.basic_type=#{type} |
| | | </select> |
| | | <select id="getOrderBasicDataType"> |
| | | select |
| | | a.basic_category |
| | | from |
| | | basic_data as a |
| | | where a.basic_type='order' |
| | | where a.basic_type=#{type} |
| | | group by a.basic_category |
| | | |
| | | </select> |
| | |
| | | <resultMap id="orderGlassDetailMap" type="com.example.erp.entity.sd.OrderGlassDetail" > |
| | | <id column="id" property="id"/> |
| | | <result column="order_id" property="orderId"/> |
| | | <result column="order_number" property="orderNumber"/> |
| | | <result column="glass_address" property="glassAddress"/> |
| | | <result column="technology_number" property="technologyNumber"/> |
| | | <result column="glass_child" property="glassChild"/> |
| | |
| | | <result column="process" property="process"/> |
| | | <!--接收其他外键实体类数据--> |
| | | <association property="orderDetail" javaType="com.example.erp.entity.sd.OrderDetail"> |
| | | <result column="order_number" property="orderNumber"/> |
| | | |
| | | <result column="building_number" property="buildingNumber"/> |
| | | |
| | | <result column="product_name" property="productName"/> |
| | |
| | | <select id="selectOrderGlassDetailByOrderId" resultMap="orderGlassDetailMap"> |
| | | select |
| | | a.order_id, |
| | | b.order_number, |
| | | a.order_number, |
| | | b.building_number, |
| | | b.product_name, |
| | | a.glass_address, |
| | |
| | | where a.order_id = #{orderId} |
| | | order by a.order_number,a.technology_number |
| | | </select> |
| | | |
| | | <update id="updateSizeAndProcess" parameterType="java.util.List"> |
| | | <foreach collection="orderGlassDetails" item="item" index="index" open="" close="" separator=";"> |
| | | update order_glass_detail |
| | | set |
| | | child_width = #{item.childWidth}, |
| | | child_height = #{item.childHeight}, |
| | | process = #{item.process} |
| | | where |
| | | order_id = #{item.orderId} |
| | | and order_number = #{item.orderNumber} |
| | | and technology_number = #{item.technologyNumber} |
| | | </foreach> |
| | | |
| | | </update> |
| | | </mapper> |
| | |
| | | </if> |
| | | |
| | | <if test="order.customerId != null and order.customerId != ''"> |
| | | and o.customer_id REGEXP #{customerId} |
| | | and o.customer_id REGEXP #{order.customerId} |
| | | </if> |
| | | <if test="order.customerName != null and order.customerName != ''"> |
| | | and o.customer_name REGEXP #{customerName} |
| | | and o.customer_name REGEXP #{order.customerName} |
| | | </if> |
| | | <if test="order.project != null and order.project != ''"> |
| | | and o.project REGEXP #{order.project} |
| | |
| | | </if> |
| | | |
| | | <if test="order.area != null and order.area != ''"> |
| | | and o.area REGEXP #{order.area} |
| | | and o.area REGEXP REGEXP_REPLACE(#{order.area}, '\\.0+$', '') |
| | | </if> |
| | | <if test="order.createTime != null and order.createTime != ''"> |
| | | and date(o.create_time) = #{order.createTime} |
| | |
| | | </if> |
| | | |
| | | <if test="order.customerId != null and order.customerId != ''"> |
| | | and o.customer_id REGEXP #{customerId} |
| | | and o.customer_id REGEXP #{order.customerId} |
| | | </if> |
| | | <if test="order.customerName != null and order.customerName != ''"> |
| | | and o.customer_name REGEXP #{customerName} |
| | | and o.customer_name REGEXP #{order.customerName} |
| | | </if> |
| | | <if test="order.project != null and order.project != ''"> |
| | | and o.project REGEXP #{order.project} |