正在显示
7 个修改的文件
包含
64 行增加
和
17 行删除
jeecg-boot-erp/src/main/java/org/jeecg/modules/erp/order_form/controller/TblOrderFormController.java
| @@ -18,6 +18,7 @@ import org.jeecg.common.system.query.QueryGenerator; | @@ -18,6 +18,7 @@ import org.jeecg.common.system.query.QueryGenerator; | ||
| 18 | import org.jeecg.common.system.util.JwtUtil; | 18 | import org.jeecg.common.system.util.JwtUtil; |
| 19 | import org.jeecg.common.system.vo.LoginUser; | 19 | import org.jeecg.common.system.vo.LoginUser; |
| 20 | import org.jeecg.common.util.oConvertUtils; | 20 | import org.jeecg.common.util.oConvertUtils; |
| 21 | +import org.jeecg.modules.erp.bidding_info.form.BiddingShenqForm; | ||
| 21 | import org.jeecg.modules.erp.order_form.entity.TblOrderForm; | 22 | import org.jeecg.modules.erp.order_form.entity.TblOrderForm; |
| 22 | import org.jeecg.modules.erp.order_form.entity.TblProductType; | 23 | import org.jeecg.modules.erp.order_form.entity.TblProductType; |
| 23 | import org.jeecg.modules.erp.order_form.entity.TblWorkOrder; | 24 | import org.jeecg.modules.erp.order_form.entity.TblWorkOrder; |
| @@ -86,9 +87,9 @@ public class TblOrderFormController extends JeecgController<TblOrderForm, ITblOr | @@ -86,9 +87,9 @@ public class TblOrderFormController extends JeecgController<TblOrderForm, ITblOr | ||
| 86 | @RequestParam(name="pageNo", defaultValue="1") Integer pageNo, | 87 | @RequestParam(name="pageNo", defaultValue="1") Integer pageNo, |
| 87 | @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, | 88 | @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, |
| 88 | HttpServletRequest req) { | 89 | HttpServletRequest req) { |
| 89 | - QueryWrapper<TblOrderForm> queryWrapper = QueryGenerator.initQueryWrapper(tblOrderForm, req.getParameterMap()); | 90 | +// QueryWrapper<TblOrderForm> queryWrapper = QueryGenerator.initQueryWrapper(tblOrderForm, req.getParameterMap()); |
| 90 | Page<TblOrderForm> page = new Page<TblOrderForm>(pageNo, pageSize); | 91 | Page<TblOrderForm> page = new Page<TblOrderForm>(pageNo, pageSize); |
| 91 | - IPage<TblOrderForm> pageList = tblOrderFormService.page(page, queryWrapper); | 92 | + IPage<TblOrderForm> pageList = tblOrderFormService.selectList(page, tblOrderForm); |
| 92 | return Result.OK(pageList); | 93 | return Result.OK(pageList); |
| 93 | } | 94 | } |
| 94 | 95 |
| @@ -69,6 +69,10 @@ public class TblOrderForm implements Serializable { | @@ -69,6 +69,10 @@ public class TblOrderForm implements Serializable { | ||
| 69 | @ApiModelProperty(value = "产品名称") | 69 | @ApiModelProperty(value = "产品名称") |
| 70 | private java.lang.String productName; | 70 | private java.lang.String productName; |
| 71 | 71 | ||
| 72 | + @Excel(name = "产品类型id", width = 15) | ||
| 73 | + @ApiModelProperty(value = "产品类型id") | ||
| 74 | + private java.lang.String productTypeId; | ||
| 75 | + | ||
| 72 | @Excel(name = "产品类型", width = 15) | 76 | @Excel(name = "产品类型", width = 15) |
| 73 | @ApiModelProperty(value = "产品类型") | 77 | @ApiModelProperty(value = "产品类型") |
| 74 | private java.lang.String productType; | 78 | private java.lang.String productType; |
| 1 | package org.jeecg.modules.erp.order_form.mapper; | 1 | package org.jeecg.modules.erp.order_form.mapper; |
| 2 | 2 | ||
| 3 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; | 3 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| 4 | +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | ||
| 5 | +import org.apache.ibatis.annotations.Param; | ||
| 6 | +import org.jeecg.modules.erp.bidding_info.form.BiddingShenqForm; | ||
| 4 | import org.jeecg.modules.erp.order_form.entity.TblOrderForm; | 7 | import org.jeecg.modules.erp.order_form.entity.TblOrderForm; |
| 5 | 8 | ||
| 6 | import java.util.List; | 9 | import java.util.List; |
| @@ -22,4 +25,6 @@ public interface TblOrderFormMapper extends BaseMapper<TblOrderForm> { | @@ -22,4 +25,6 @@ public interface TblOrderFormMapper extends BaseMapper<TblOrderForm> { | ||
| 22 | Integer updateDesignerByOrderId(TblOrderForm tblOrderForm); | 25 | Integer updateDesignerByOrderId(TblOrderForm tblOrderForm); |
| 23 | Integer updateProductDesignStatusByOrderId(TblOrderForm tblOrderForm); | 26 | Integer updateProductDesignStatusByOrderId(TblOrderForm tblOrderForm); |
| 24 | 27 | ||
| 28 | + Page<TblOrderForm> selectList(Page<TblOrderForm> page,@Param("qc") TblOrderForm tblOrderForm); | ||
| 29 | + | ||
| 25 | } | 30 | } |
| @@ -20,16 +20,16 @@ | @@ -20,16 +20,16 @@ | ||
| 20 | NOW())>= 0 | 20 | NOW())>= 0 |
| 21 | AND STATUS = '生产中' | 21 | AND STATUS = '生产中' |
| 22 | </select> | 22 | </select> |
| 23 | - <select id="selectAll" resultType="org.jeecg.modules.erp.order_form.entity.TblOrderForm"> | ||
| 24 | - SELECT | ||
| 25 | - a.id,a.create_by,a.create_time,a.update_by,a.update_time,a.sys_org_code,a.order_id,a.order_company, | ||
| 26 | - a.work_order,a.product_name,b.product_type_name as product_type,a.order_date,a.designer, | ||
| 27 | - a.dispatch_date,a.delivery_date,a.quantity,a.total_working_hours,a.dispatched_working_hours,a.STATUS, | ||
| 28 | - a.finish_date,a.dispatch_status,a.product_design_status,a.verify_status,a.verify_result,a.delivery_date1,a.pics,a.pics2 | ||
| 29 | - FROM | ||
| 30 | - tbl_order_form a | ||
| 31 | - LEFT JOIN tbl_product_type b on a.product_type = b.product_type_id | ||
| 32 | - </select> | 23 | +<!-- <select id="selectAll" resultType="org.jeecg.modules.erp.order_form.entity.TblOrderForm">--> |
| 24 | +<!-- SELECT--> | ||
| 25 | +<!-- a.id,a.create_by,a.create_time,a.update_by,a.update_time,a.sys_org_code,a.order_id,a.order_company,--> | ||
| 26 | +<!-- a.work_order,a.product_name,b.product_type_name as product_type,a.order_date,a.designer,--> | ||
| 27 | +<!-- a.dispatch_date,a.delivery_date,a.quantity,a.total_working_hours,a.dispatched_working_hours,a.STATUS,--> | ||
| 28 | +<!-- a.finish_date,a.dispatch_status,a.product_design_status,a.verify_status,a.verify_result,a.delivery_date1,a.pics,a.pics2--> | ||
| 29 | +<!-- FROM--> | ||
| 30 | +<!-- tbl_order_form a--> | ||
| 31 | +<!-- LEFT JOIN tbl_product_type b on a.product_type = b.product_type_id--> | ||
| 32 | +<!-- </select>--> | ||
| 33 | <select id="getCountByType" parameterType="java.lang.String" resultType="java.lang.Integer"> | 33 | <select id="getCountByType" parameterType="java.lang.String" resultType="java.lang.Integer"> |
| 34 | SELECT | 34 | SELECT |
| 35 | count(product_type) | 35 | count(product_type) |
| @@ -55,4 +55,32 @@ | @@ -55,4 +55,32 @@ | ||
| 55 | <update id="updateProductDesignStatusByOrderId" parameterType="org.jeecg.modules.erp.order_form.entity.TblOrderForm"> | 55 | <update id="updateProductDesignStatusByOrderId" parameterType="org.jeecg.modules.erp.order_form.entity.TblOrderForm"> |
| 56 | update tbl_order_form set product_design_status = #{productDesignStatus} where order_id =#{orderId} | 56 | update tbl_order_form set product_design_status = #{productDesignStatus} where order_id =#{orderId} |
| 57 | </update> | 57 | </update> |
| 58 | + <select id="selectList" resultType="org.jeecg.modules.erp.order_form.entity.TblOrderForm"> | ||
| 59 | + SELECT | ||
| 60 | + a.id,a.create_by,a.create_time,a.update_by,a.update_time, | ||
| 61 | + a.sys_org_code,a.order_id,a.order_company,a.work_order,a.product_name, c.product_type_id as product_type_id,c.product_type_name as product_type,a.order_date,a.design_role,a.designer,a.dispatch_date, | ||
| 62 | + a.delivery_date,a.quantity,a.total_working_hours,if(b.dispatched_working_hours != 0,b.dispatched_working_hours,0) dispatched_working_hours,a.STATUS,a.finish_date,a.assign_design_status, | ||
| 63 | + a.dispatch_status,a.product_design_status,a.verify_status,a.verify_result,a.delivery_date1,a.pics,a.files,a.pics2 | ||
| 64 | + FROM | ||
| 65 | + tbl_order_form a | ||
| 66 | + LEFT JOIN ( SELECT order_number, sum( work_hours ) dispatched_working_hours FROM tbl_production_gongxu GROUP BY order_number ) b ON a.order_id = b.order_number | ||
| 67 | + left join tbl_product_type c on a.product_type = c.product_type_id | ||
| 68 | + where 1=1 | ||
| 69 | + <if test="qc.designer!=null and qc.designer !=''"> | ||
| 70 | + and a.designer like concat('%',#{qc.designer},'%') | ||
| 71 | + </if> | ||
| 72 | + <if test="qc.orderCompany!=null and qc.orderCompany !=''"> | ||
| 73 | + and a.order_company like concat('%',#{qc.orderCompany},'%') | ||
| 74 | + </if> | ||
| 75 | + <if test="qc.workOrder!=null and qc.workOrder !=''"> | ||
| 76 | + and a.work_order like concat('%',#{qc.workOrder},'%') | ||
| 77 | + </if> | ||
| 78 | + <if test="qc.workOrder!=null and qc.workOrder !=''"> | ||
| 79 | + and a.work_order like concat('%', #{biddingShenqForm.workOrder}, '%') | ||
| 80 | + </if> | ||
| 81 | + <if test="qc.productType!=null and qc.productType !=''"> | ||
| 82 | + and c.product_type_id like concat('%', #{qc.productType}, '%') | ||
| 83 | + </if> | ||
| 84 | + order by a.create_time desc | ||
| 85 | + </select> | ||
| 58 | </mapper> | 86 | </mapper> |
| 1 | package org.jeecg.modules.erp.order_form.service; | 1 | package org.jeecg.modules.erp.order_form.service; |
| 2 | 2 | ||
| 3 | +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | ||
| 3 | import com.baomidou.mybatisplus.extension.service.IService; | 4 | import com.baomidou.mybatisplus.extension.service.IService; |
| 5 | +import org.jeecg.modules.erp.bidding_info.form.BiddingShenqForm; | ||
| 4 | import org.jeecg.modules.erp.order_form.entity.TblOrderForm; | 6 | import org.jeecg.modules.erp.order_form.entity.TblOrderForm; |
| 5 | 7 | ||
| 6 | import java.io.Serializable; | 8 | import java.io.Serializable; |
| @@ -39,4 +41,6 @@ public interface ITblOrderFormService extends IService<TblOrderForm> { | @@ -39,4 +41,6 @@ public interface ITblOrderFormService extends IService<TblOrderForm> { | ||
| 39 | Integer updateDesignerByOrderId(TblOrderForm tblOrderForm); | 41 | Integer updateDesignerByOrderId(TblOrderForm tblOrderForm); |
| 40 | Integer updateProductDesignStatusByOrderId(TblOrderForm tblOrderForm); | 42 | Integer updateProductDesignStatusByOrderId(TblOrderForm tblOrderForm); |
| 41 | 43 | ||
| 44 | + Page<TblOrderForm> selectList(Page<TblOrderForm> page, TblOrderForm tblOrderForm); | ||
| 45 | + | ||
| 42 | } | 46 | } |
| 1 | package org.jeecg.modules.erp.order_form.service.impl; | 1 | package org.jeecg.modules.erp.order_form.service.impl; |
| 2 | 2 | ||
| 3 | +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | ||
| 3 | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | 4 | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| 4 | import org.jeecg.modules.erp.order_form.entity.TblOrderForm; | 5 | import org.jeecg.modules.erp.order_form.entity.TblOrderForm; |
| 5 | import org.jeecg.modules.erp.order_form.mapper.TblOrderFormMapper; | 6 | import org.jeecg.modules.erp.order_form.mapper.TblOrderFormMapper; |
| @@ -68,4 +69,9 @@ public class TblOrderFormServiceImpl extends ServiceImpl<TblOrderFormMapper, Tbl | @@ -68,4 +69,9 @@ public class TblOrderFormServiceImpl extends ServiceImpl<TblOrderFormMapper, Tbl | ||
| 68 | return tblOrderFormMapper.updateProductDesignStatusByOrderId(tblOrderForm); | 69 | return tblOrderFormMapper.updateProductDesignStatusByOrderId(tblOrderForm); |
| 69 | } | 70 | } |
| 70 | 71 | ||
| 72 | + @Override | ||
| 73 | + public Page<TblOrderForm> selectList(Page<TblOrderForm> page, TblOrderForm tblOrderForm) { | ||
| 74 | + return tblOrderFormMapper.selectList(page,tblOrderForm); | ||
| 75 | + } | ||
| 76 | + | ||
| 71 | } | 77 | } |
jeecg-boot-module-system/src/main/java/org/jeecg/modules/api/controller/ProductDesignController.java
| @@ -42,12 +42,11 @@ public class ProductDesignController { | @@ -42,12 +42,11 @@ public class ProductDesignController { | ||
| 42 | String userNameByToken = JwtUtil.getUserNameByToken(req); | 42 | String userNameByToken = JwtUtil.getUserNameByToken(req); |
| 43 | List<String> roleList = sysUserService.getRole(userNameByToken); | 43 | List<String> roleList = sysUserService.getRole(userNameByToken); |
| 44 | SysUser sysUser = sysUserService.getUserByName(userNameByToken); | 44 | SysUser sysUser = sysUserService.getUserByName(userNameByToken); |
| 45 | - QueryWrapper<TblOrderForm> queryWrapper = QueryGenerator.initQueryWrapper(tblOrderForm, req.getParameterMap()); | ||
| 46 | -// queryWrapper.isNotNull("designer"); | ||
| 47 | -// queryWrapper.in("design_role",roleList); | ||
| 48 | - queryWrapper.eq("designer", sysUser.getWorkNo()); | 45 | + tblOrderForm.setDesigner(sysUser.getWorkNo()); |
| 46 | +// QueryWrapper<TblOrderForm> queryWrapper = QueryGenerator.initQueryWrapper(tblOrderForm, req.getParameterMap()); | ||
| 47 | +// queryWrapper.eq("designer", sysUser.getWorkNo()); | ||
| 49 | Page<TblOrderForm> page = new Page<TblOrderForm>(pageNo, pageSize); | 48 | Page<TblOrderForm> page = new Page<TblOrderForm>(pageNo, pageSize); |
| 50 | - IPage<TblOrderForm> pageList = tblOrderFormService.page(page, queryWrapper); | 49 | + IPage<TblOrderForm> pageList = tblOrderFormService.selectList(page, tblOrderForm); |
| 51 | return Result.OK(pageList); | 50 | return Result.OK(pageList); |
| 52 | } | 51 | } |
| 53 | 52 |
-
请 注册 或 登录 后发表评论