Showing
12 changed files
with
71 additions
and
11 deletions
| @@ -222,6 +222,12 @@ public class GetPurchaseOrderInfoBo extends BaseBo<PurchaseOrderInfo> { | @@ -222,6 +222,12 @@ public class GetPurchaseOrderInfoBo extends BaseBo<PurchaseOrderInfo> { | ||
| 222 | @ApiModelProperty("规格变更状态") | 222 | @ApiModelProperty("规格变更状态") |
| 223 | private String specChangeStatus; | 223 | private String specChangeStatus; |
| 224 | 224 | ||
| 225 | + /** | ||
| 226 | + * 订货单类型(生产:PRODUCTION 无需生产:NO_PRODUCTION) | ||
| 227 | + */ | ||
| 228 | + @ApiModelProperty("订货单类型") | ||
| 229 | + private String type; | ||
| 230 | + | ||
| 225 | 231 | ||
| 226 | 232 | ||
| 227 | public GetPurchaseOrderInfoBo() { | 233 | public GetPurchaseOrderInfoBo() { |
| @@ -123,9 +123,9 @@ public class GetPurchaseOrderLineBo extends BaseBo<PurchaseOrderLine> { | @@ -123,9 +123,9 @@ public class GetPurchaseOrderLineBo extends BaseBo<PurchaseOrderLine> { | ||
| 123 | private BigDecimal salesPrice; | 123 | private BigDecimal salesPrice; |
| 124 | 124 | ||
| 125 | /** | 125 | /** |
| 126 | - * 交货日期 | 126 | + * 发货日期 |
| 127 | */ | 127 | */ |
| 128 | - @ApiModelProperty("交货日期") | 128 | + @ApiModelProperty("发货日期") |
| 129 | @JsonFormat(pattern = StringPool.DATE_PATTERN) | 129 | @JsonFormat(pattern = StringPool.DATE_PATTERN) |
| 130 | private LocalDate deliveryDate; | 130 | private LocalDate deliveryDate; |
| 131 | 131 |
xingyun-sc/src/main/java/com/lframework/xingyun/sc/controller/order/PurchaseOrderInfoController.java
| @@ -9,9 +9,12 @@ import com.lframework.starter.web.core.annotations.security.HasPermission; | @@ -9,9 +9,12 @@ import com.lframework.starter.web.core.annotations.security.HasPermission; | ||
| 9 | import com.lframework.starter.web.core.components.resp.InvokeResult; | 9 | import com.lframework.starter.web.core.components.resp.InvokeResult; |
| 10 | import com.lframework.starter.web.core.components.resp.InvokeResultBuilder; | 10 | import com.lframework.starter.web.core.components.resp.InvokeResultBuilder; |
| 11 | import com.lframework.starter.web.core.components.resp.PageResult; | 11 | import com.lframework.starter.web.core.components.resp.PageResult; |
| 12 | +import com.lframework.starter.web.core.components.security.SecurityUtil; | ||
| 12 | import com.lframework.starter.web.core.controller.DefaultBaseController; | 13 | import com.lframework.starter.web.core.controller.DefaultBaseController; |
| 13 | import com.lframework.starter.web.core.utils.PageResultUtil; | 14 | import com.lframework.starter.web.core.utils.PageResultUtil; |
| 15 | +import com.lframework.starter.web.inner.entity.SysRole; | ||
| 14 | import com.lframework.starter.web.inner.entity.SysUser; | 16 | import com.lframework.starter.web.inner.entity.SysUser; |
| 17 | +import com.lframework.starter.web.inner.service.system.SysRoleService; | ||
| 15 | import com.lframework.starter.web.inner.service.system.SysUserService; | 18 | import com.lframework.starter.web.inner.service.system.SysUserService; |
| 16 | import com.lframework.xingyun.sc.bo.order.GetPurchaseOrderInfoBo; | 19 | import com.lframework.xingyun.sc.bo.order.GetPurchaseOrderInfoBo; |
| 17 | import com.lframework.xingyun.sc.entity.PurchaseOrderInfo; | 20 | import com.lframework.xingyun.sc.entity.PurchaseOrderInfo; |
| @@ -74,6 +77,8 @@ public class PurchaseOrderInfoController extends DefaultBaseController { | @@ -74,6 +77,8 @@ public class PurchaseOrderInfoController extends DefaultBaseController { | ||
| 74 | private PurchaseOrderLineService purchaseOrderLineService; | 77 | private PurchaseOrderLineService purchaseOrderLineService; |
| 75 | @Autowired | 78 | @Autowired |
| 76 | private SysUserService sysUserService; | 79 | private SysUserService sysUserService; |
| 80 | + @Resource | ||
| 81 | + private SysRoleService sysRoleService; | ||
| 77 | 82 | ||
| 78 | /** | 83 | /** |
| 79 | * 查询列表 | 84 | * 查询列表 |
| @@ -134,6 +139,23 @@ public class PurchaseOrderInfoController extends DefaultBaseController { | @@ -134,6 +139,23 @@ public class PurchaseOrderInfoController extends DefaultBaseController { | ||
| 134 | vo.setPurchaseOrderId(id); | 139 | vo.setPurchaseOrderId(id); |
| 135 | List<PurchaseOrderLine> purchaseOrderLineList = purchaseOrderLineService.query(vo); | 140 | List<PurchaseOrderLine> purchaseOrderLineList = purchaseOrderLineService.query(vo); |
| 136 | if (CollectionUtil.isNotEmpty(purchaseOrderLineList)) { | 141 | if (CollectionUtil.isNotEmpty(purchaseOrderLineList)) { |
| 142 | + //生产人员不展示价格,生产人员角色只会有单个 | ||
| 143 | + List<SysRole> sysRoleList = sysRoleService.getByUserId(SecurityUtil.getCurrentUser().getId()); | ||
| 144 | + if (CollectionUtils.isNotEmpty(sysRoleList)) { | ||
| 145 | + Boolean b = false; | ||
| 146 | + for (SysRole sysRole : sysRoleList) { | ||
| 147 | + //todo 生产人员角色未确定 | ||
| 148 | + if ("scry".equals(sysRole.getCode())) { | ||
| 149 | + b = true; | ||
| 150 | + break; | ||
| 151 | + } | ||
| 152 | + } | ||
| 153 | + if (b) { | ||
| 154 | + for (PurchaseOrderLine purchaseOrderLine : purchaseOrderLineList) { | ||
| 155 | + purchaseOrderLine.setSalesPrice(null); | ||
| 156 | + } | ||
| 157 | + } | ||
| 158 | + } | ||
| 137 | result.setPurchaseOrderLineList(purchaseOrderLineList); | 159 | result.setPurchaseOrderLineList(purchaseOrderLineList); |
| 138 | } | 160 | } |
| 139 | 161 |
| @@ -180,6 +180,11 @@ public class PurchaseOrderInfo extends BaseEntity implements BaseDto { | @@ -180,6 +180,11 @@ public class PurchaseOrderInfo extends BaseEntity implements BaseDto { | ||
| 180 | private String specChangeStatus; | 180 | private String specChangeStatus; |
| 181 | 181 | ||
| 182 | /** | 182 | /** |
| 183 | + * 订货单类型(生产:PRODUCTION 无需生产:NO_PRODUCTION) | ||
| 184 | + */ | ||
| 185 | + private String type; | ||
| 186 | + | ||
| 187 | + /** | ||
| 183 | * 创建人ID | 188 | * 创建人ID |
| 184 | */ | 189 | */ |
| 185 | @TableField(fill = FieldFill.INSERT) | 190 | @TableField(fill = FieldFill.INSERT) |
| @@ -168,6 +168,9 @@ public class PurchaseOrderInfoServiceImpl extends BaseMpServiceImpl<PurchaseOrde | @@ -168,6 +168,9 @@ public class PurchaseOrderInfoServiceImpl extends BaseMpServiceImpl<PurchaseOrde | ||
| 168 | if (!StringUtil.isBlank(vo.getWorkshopId())) { | 168 | if (!StringUtil.isBlank(vo.getWorkshopId())) { |
| 169 | data.setWorkshopId(vo.getWorkshopId()); | 169 | data.setWorkshopId(vo.getWorkshopId()); |
| 170 | } | 170 | } |
| 171 | + if (!StringUtil.isBlank(vo.getType())) { | ||
| 172 | + data.setType(vo.getType()); | ||
| 173 | + } | ||
| 171 | 174 | ||
| 172 | getBaseMapper().insert(data); | 175 | getBaseMapper().insert(data); |
| 173 | 176 |
| @@ -189,4 +189,10 @@ public class CreatePurchaseOrderInfoVo implements BaseVo, Serializable { | @@ -189,4 +189,10 @@ public class CreatePurchaseOrderInfoVo implements BaseVo, Serializable { | ||
| 189 | @ApiModelProperty("订货单物料行") | 189 | @ApiModelProperty("订货单物料行") |
| 190 | private List<CreatePurchaseOrderLineVo> createPurchaseOrderLineVoList; | 190 | private List<CreatePurchaseOrderLineVo> createPurchaseOrderLineVoList; |
| 191 | 191 | ||
| 192 | + /** | ||
| 193 | + * 订货单类型(生产:PRODUCTION 无需生产:NO_PRODUCTION) | ||
| 194 | + */ | ||
| 195 | + @ApiModelProperty("订货单类型") | ||
| 196 | + private String type; | ||
| 197 | + | ||
| 192 | } | 198 | } |
| @@ -141,10 +141,10 @@ public class CreatePurchaseOrderLineVo implements BaseVo, Serializable { | @@ -141,10 +141,10 @@ public class CreatePurchaseOrderLineVo implements BaseVo, Serializable { | ||
| 141 | private BigDecimal salesPrice; | 141 | private BigDecimal salesPrice; |
| 142 | 142 | ||
| 143 | /** | 143 | /** |
| 144 | - * 交货日期 | 144 | + * 发货日期 |
| 145 | */ | 145 | */ |
| 146 | - @ApiModelProperty("交货日期") | ||
| 147 | - @TypeMismatch(message = "交货日期格式有误!") | 146 | + @ApiModelProperty("发货日期") |
| 147 | + @TypeMismatch(message = "发货日期格式有误!") | ||
| 148 | private LocalDate deliveryDate; | 148 | private LocalDate deliveryDate; |
| 149 | 149 | ||
| 150 | /** | 150 | /** |
| @@ -71,4 +71,10 @@ public class QueryPurchaseOrderInfoVo extends PageVo implements BaseVo, Serializ | @@ -71,4 +71,10 @@ public class QueryPurchaseOrderInfoVo extends PageVo implements BaseVo, Serializ | ||
| 71 | @ApiModelProperty("生产厂") | 71 | @ApiModelProperty("生产厂") |
| 72 | private String workshopId; | 72 | private String workshopId; |
| 73 | 73 | ||
| 74 | + /** | ||
| 75 | + * 订货单类型(生产:PRODUCTION 无需生产:NO_PRODUCTION) | ||
| 76 | + */ | ||
| 77 | + @ApiModelProperty("订货单类型") | ||
| 78 | + private String type; | ||
| 79 | + | ||
| 74 | } | 80 | } |
| @@ -32,10 +32,10 @@ public class QueryPurchaseOrderLineVo extends PageVo implements BaseVo, Serializ | @@ -32,10 +32,10 @@ public class QueryPurchaseOrderLineVo extends PageVo implements BaseVo, Serializ | ||
| 32 | private String status; | 32 | private String status; |
| 33 | 33 | ||
| 34 | /** | 34 | /** |
| 35 | - * 交货日期 | 35 | + * 发货日期 |
| 36 | */ | 36 | */ |
| 37 | - @ApiModelProperty("交货日期") | ||
| 38 | - @TypeMismatch(message = "交货日期格式有误!") | 37 | + @ApiModelProperty("发货日期") |
| 38 | + @TypeMismatch(message = "发货日期格式有误!") | ||
| 39 | private LocalDate deliveryDate; | 39 | private LocalDate deliveryDate; |
| 40 | 40 | ||
| 41 | } | 41 | } |
| @@ -197,4 +197,10 @@ public class UpdatePurchaseOrderInfoVo implements BaseVo, Serializable { | @@ -197,4 +197,10 @@ public class UpdatePurchaseOrderInfoVo implements BaseVo, Serializable { | ||
| 197 | @ApiModelProperty("订货单表物料行") | 197 | @ApiModelProperty("订货单表物料行") |
| 198 | private List<UpdatePurchaseOrderLineVo> updatePurchaseOrderLineVoList; | 198 | private List<UpdatePurchaseOrderLineVo> updatePurchaseOrderLineVoList; |
| 199 | 199 | ||
| 200 | + /** | ||
| 201 | + * 订货单类型(生产:PRODUCTION 无需生产:NO_PRODUCTION) | ||
| 202 | + */ | ||
| 203 | + @ApiModelProperty("订货单类型") | ||
| 204 | + private String type; | ||
| 205 | + | ||
| 200 | } | 206 | } |
| @@ -148,10 +148,10 @@ public class UpdatePurchaseOrderLineVo implements BaseVo, Serializable { | @@ -148,10 +148,10 @@ public class UpdatePurchaseOrderLineVo implements BaseVo, Serializable { | ||
| 148 | private BigDecimal salesPrice; | 148 | private BigDecimal salesPrice; |
| 149 | 149 | ||
| 150 | /** | 150 | /** |
| 151 | - * 交货日期 | 151 | + * 发货日期 |
| 152 | */ | 152 | */ |
| 153 | - @ApiModelProperty("交货日期") | ||
| 154 | - @TypeMismatch(message = "交货日期格式有误!") | 153 | + @ApiModelProperty("发货日期") |
| 154 | + @TypeMismatch(message = "发货日期格式有误!") | ||
| 155 | private LocalDate deliveryDate; | 155 | private LocalDate deliveryDate; |
| 156 | 156 | ||
| 157 | /** | 157 | /** |
| @@ -32,6 +32,7 @@ | @@ -32,6 +32,7 @@ | ||
| 32 | <result column="workshop_name" property="workshopName"/> | 32 | <result column="workshop_name" property="workshopName"/> |
| 33 | <result column="customer_credit_id" property="customerCreditId"/> | 33 | <result column="customer_credit_id" property="customerCreditId"/> |
| 34 | <result column="customer_tier" property="customerTier"/> | 34 | <result column="customer_tier" property="customerTier"/> |
| 35 | + <result column="type" property="type"/> | ||
| 35 | <result column="create_by_id" property="createById"/> | 36 | <result column="create_by_id" property="createById"/> |
| 36 | <result column="create_by" property="createBy"/> | 37 | <result column="create_by" property="createBy"/> |
| 37 | <result column="update_by_id" property="updateById"/> | 38 | <result column="update_by_id" property="updateById"/> |
| @@ -71,6 +72,7 @@ | @@ -71,6 +72,7 @@ | ||
| 71 | ws.name AS workshop_name, | 72 | ws.name AS workshop_name, |
| 72 | tb.customer_credit_id, | 73 | tb.customer_credit_id, |
| 73 | cc.company_suggested_category AS customer_tier, | 74 | cc.company_suggested_category AS customer_tier, |
| 75 | + tb.type, | ||
| 74 | tb.create_by_id, | 76 | tb.create_by_id, |
| 75 | tb.create_by, | 77 | tb.create_by, |
| 76 | tb.update_by_id, | 78 | tb.update_by_id, |
| @@ -116,6 +118,9 @@ | @@ -116,6 +118,9 @@ | ||
| 116 | <if test="vo.workshopId != null and vo.workshopId != ''"> | 118 | <if test="vo.workshopId != null and vo.workshopId != ''"> |
| 117 | AND tb.workshop_id = #{vo.workshopId} | 119 | AND tb.workshop_id = #{vo.workshopId} |
| 118 | </if> | 120 | </if> |
| 121 | + <if test="vo.type != null and vo.type != ''"> | ||
| 122 | + AND tb.type = #{vo.type} | ||
| 123 | + </if> | ||
| 119 | </where> | 124 | </where> |
| 120 | ORDER BY tb.update_time DESC | 125 | ORDER BY tb.update_time DESC |
| 121 | </select> | 126 | </select> |
| @@ -155,6 +160,7 @@ | @@ -155,6 +160,7 @@ | ||
| 155 | AND (tb.revoke_status = '' OR tb.revoke_status = null OR tb.revoke_status='CANCEL' OR | 160 | AND (tb.revoke_status = '' OR tb.revoke_status = null OR tb.revoke_status='CANCEL' OR |
| 156 | tb.revoke_status='PARTIAL') | 161 | tb.revoke_status='PARTIAL') |
| 157 | AND (tb.status='ISSUED' OR tb.status='WAIT' OR tb.status='TRANSIT') | 162 | AND (tb.status='ISSUED' OR tb.status='WAIT' OR tb.status='TRANSIT') |
| 163 | + AND tb.type ='PRODUCTION' | ||
| 158 | </where> | 164 | </where> |
| 159 | ORDER BY tb.update_time DESC | 165 | ORDER BY tb.update_time DESC |
| 160 | </select> | 166 | </select> |