Browse Source
# Conflicts: # yxt-oa/src/main/java/com/yxt/anrui/oa/feign/flowable/flow/ProcDefEnum.javamaster
75 changed files with 3589 additions and 308 deletions
@ -0,0 +1,17 @@ |
|||
package com.yxt.anrui.terminal.api.as.firstshelves; |
|||
|
|||
import com.yxt.common.core.dto.Dto; |
|||
import com.yxt.common.core.vo.Vo; |
|||
import lombok.Data; |
|||
|
|||
import java.math.BigDecimal; |
|||
import java.util.List; |
|||
|
|||
@Data |
|||
public class AppFirstShelvesDto implements Dto { |
|||
|
|||
private String userSid; |
|||
private String orgPath; |
|||
|
|||
private List<AppFirstShelvesGoodsDto> goodsList; |
|||
} |
@ -0,0 +1,35 @@ |
|||
package com.yxt.anrui.terminal.api.as.firstshelves; |
|||
|
|||
import com.yxt.common.core.query.PagerQuery; |
|||
import com.yxt.common.core.result.ResultBean; |
|||
import com.yxt.common.core.vo.PagerVo; |
|||
import io.swagger.annotations.ApiOperation; |
|||
import org.springframework.cloud.openfeign.FeignClient; |
|||
import org.springframework.web.bind.annotation.*; |
|||
|
|||
/** |
|||
* @Author |
|||
* @Date |
|||
* @Description |
|||
*/ |
|||
@FeignClient( |
|||
contextId = "terminal-AppFirstShelves", |
|||
name = "anrui-terminal", |
|||
path = "v1/firstshelves") |
|||
public interface AppFirstShelvesFeign { |
|||
|
|||
@PostMapping("/list") |
|||
@ApiOperation("打印商品标签列表") |
|||
ResultBean<AppFirstShelvesVo> list(@RequestBody PagerQuery<AppFirstShelvesQuery> pagerQuery); |
|||
|
|||
@ApiOperation("标签扫描") |
|||
@GetMapping("/scan") |
|||
@ResponseBody |
|||
public ResultBean<AppFirstShelvesScanVo> scan(@RequestParam("content") String content, @RequestParam("type") String type, @RequestParam("orgPath") String orgPath); |
|||
|
|||
@ApiOperation("上架保存") |
|||
@PostMapping("/save") |
|||
@ResponseBody |
|||
public ResultBean save(@RequestBody AppFirstShelvesDto dto); |
|||
|
|||
} |
@ -0,0 +1,12 @@ |
|||
package com.yxt.anrui.terminal.api.as.firstshelves; |
|||
|
|||
import com.yxt.common.core.dto.Dto; |
|||
import lombok.Data; |
|||
|
|||
@Data |
|||
public class AppFirstShelvesGoodsDto implements Dto { |
|||
|
|||
private String goodsID; |
|||
private String houseCode; |
|||
private String count; |
|||
} |
@ -0,0 +1,32 @@ |
|||
package com.yxt.anrui.terminal.api.as.firstshelves; |
|||
|
|||
import com.yxt.common.core.vo.Vo; |
|||
import lombok.Data; |
|||
|
|||
import java.math.BigDecimal; |
|||
|
|||
@Data |
|||
public class AppFirstShelvesGoodsVo implements Vo { |
|||
|
|||
private String sid; |
|||
/** |
|||
* 商品名称 |
|||
*/ |
|||
private String name; |
|||
/** |
|||
* 商品id |
|||
*/ |
|||
private String _id; |
|||
/** |
|||
* 数量 |
|||
*/ |
|||
private BigDecimal num; |
|||
/** |
|||
* 单位 |
|||
*/ |
|||
private String unit; |
|||
/** |
|||
* 规格 |
|||
*/ |
|||
private String specs; |
|||
} |
@ -0,0 +1,13 @@ |
|||
package com.yxt.anrui.terminal.api.as.firstshelves; |
|||
|
|||
import com.yxt.common.core.query.Query; |
|||
import lombok.Data; |
|||
|
|||
@Data |
|||
public class AppFirstShelvesQuery implements Query { |
|||
|
|||
private String menuSid; |
|||
private String userSid; |
|||
private String orgPath; |
|||
private String name; |
|||
} |
@ -0,0 +1,26 @@ |
|||
package com.yxt.anrui.terminal.api.as.firstshelves; |
|||
|
|||
import com.yxt.common.core.vo.Vo; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
import java.math.BigDecimal; |
|||
|
|||
@Data |
|||
public class AppFirstShelvesScanVo implements Vo { |
|||
|
|||
@ApiModelProperty("0商品码,1库位码") |
|||
private String type; |
|||
@ApiModelProperty("商品名称") |
|||
private String goodsName; |
|||
@ApiModelProperty("商品id") |
|||
private String goodsID; |
|||
@ApiModelProperty("商品最大可上架数量") |
|||
private String goodsMax; |
|||
@ApiModelProperty("库位码") |
|||
private String houseCode; |
|||
@ApiModelProperty("库区名+库位名") |
|||
private String houseName; |
|||
@ApiModelProperty("仓库地址") |
|||
private String houseAddress; |
|||
} |
@ -0,0 +1,13 @@ |
|||
package com.yxt.anrui.terminal.api.as.firstshelves; |
|||
|
|||
import com.yxt.common.core.vo.Vo; |
|||
import lombok.Data; |
|||
|
|||
import java.util.List; |
|||
|
|||
@Data |
|||
public class AppFirstShelvesVo implements Vo { |
|||
|
|||
private Integer pages = 1; |
|||
private List<AppFirstShelvesGoodsVo> goods; |
|||
} |
@ -0,0 +1,57 @@ |
|||
/********************************************************* |
|||
********************************************************* |
|||
******************** ******************* |
|||
************* ************ |
|||
******* _oo0oo_ ******* |
|||
*** o8888888o *** |
|||
* 88" . "88 * |
|||
* (| -_- |) * |
|||
* 0\ = /0 * |
|||
* ___/`---'\___ * |
|||
* .' \\| |// '. *
|
|||
* / \\||| : |||// \ *
|
|||
* / _||||| -:- |||||- \ * |
|||
* | | \\\ - /// | | *
|
|||
* | \_| ''\---/'' |_/ | * |
|||
* \ .-\__ '-' ___/-. / * |
|||
* ___'. .' /--.--\ `. .'___ * |
|||
* ."" '< `.___\_<|>_/___.' >' "". * |
|||
* | | : `- \`.;`\ _ /`;.`/ - ` : | | * |
|||
* \ \ `_. \_ __\ /__ _/ .-` / / * |
|||
* =====`-.____`.___ \_____/___.-`___.-'===== * |
|||
* `=---=' * |
|||
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * |
|||
*********__佛祖保佑__永无BUG__验收通过__钞票多多__********* |
|||
*********************************************************/ |
|||
package com.yxt.anrui.terminal.biz.as.firstshelves; |
|||
|
|||
import com.yxt.anrui.terminal.api.as.firstshelves.*; |
|||
import com.yxt.common.core.query.PagerQuery; |
|||
import com.yxt.common.core.result.ResultBean; |
|||
import com.yxt.common.core.vo.PagerVo; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.web.bind.annotation.RequestMapping; |
|||
import org.springframework.web.bind.annotation.RestController; |
|||
|
|||
@RestController |
|||
@RequestMapping("v1/firstshelves") |
|||
public class AppFirstShelvesRest implements AppFirstShelvesFeign { |
|||
|
|||
@Autowired |
|||
private AppFirstShelvesService appFirstShelvesService; |
|||
|
|||
@Override |
|||
public ResultBean<AppFirstShelvesVo> list(PagerQuery<AppFirstShelvesQuery> pagerQuery) { |
|||
return appFirstShelvesService.list(pagerQuery); |
|||
} |
|||
|
|||
@Override |
|||
public ResultBean<AppFirstShelvesScanVo> scan(String content, String type, String orgPath) { |
|||
return appFirstShelvesService.scan(content, type, orgPath); |
|||
} |
|||
|
|||
@Override |
|||
public ResultBean save(AppFirstShelvesDto dto) { |
|||
return appFirstShelvesService.save(dto); |
|||
} |
|||
} |
@ -0,0 +1,188 @@ |
|||
/********************************************************* |
|||
********************************************************* |
|||
******************** ******************* |
|||
************* ************ |
|||
******* _oo0oo_ ******* |
|||
*** o8888888o *** |
|||
* 88" . "88 * |
|||
* (| -_- |) * |
|||
* 0\ = /0 * |
|||
* ___/`---'\___ * |
|||
* .' \\| |// '. *
|
|||
* / \\||| : |||// \ *
|
|||
* / _||||| -:- |||||- \ * |
|||
* | | \\\ - /// | | *
|
|||
* | \_| ''\---/'' |_/ | * |
|||
* \ .-\__ '-' ___/-. / * |
|||
* ___'. .' /--.--\ `. .'___ * |
|||
* ."" '< `.___\_<|>_/___.' >' "". * |
|||
* | | : `- \`.;`\ _ /`;.`/ - ` : | | * |
|||
* \ \ `_. \_ __\ /__ _/ .-` / / * |
|||
* =====`-.____`.___ \_____/___.-`___.-'===== * |
|||
* `=---=' * |
|||
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * |
|||
*********__佛祖保佑__永无BUG__验收通过__钞票多多__********* |
|||
*********************************************************/ |
|||
package com.yxt.anrui.terminal.biz.as.firstshelves; |
|||
|
|||
import cn.hutool.core.date.DateUtil; |
|||
import com.yxt.anrui.portal.api.sysstafforg.SysStaffOrgFeign; |
|||
import com.yxt.anrui.terminal.api.as.firstshelves.*; |
|||
import com.yxt.anrui.terminal.fegin.wmsInventory.WmsInventoryFeign; |
|||
import com.yxt.anrui.terminal.fegin.wmsInventory.WmsInventorySaveDto; |
|||
import com.yxt.anrui.terminal.fegin.wmsgoodstag.GoodsTagListQuery; |
|||
import com.yxt.anrui.terminal.fegin.wmsgoodstag.WmsGoodsTag; |
|||
import com.yxt.anrui.terminal.fegin.wmsgoodstag.WmsGoodsTagFeign; |
|||
import com.yxt.anrui.terminal.fegin.wmsinitialdetail.WmsInitialDetail; |
|||
import com.yxt.anrui.terminal.fegin.wmsinitialdetail.WmsInitialDetailFeign; |
|||
import com.yxt.anrui.terminal.fegin.wmswarehouserack.WmsHouseInfoVo; |
|||
import com.yxt.anrui.terminal.fegin.wmswarehouserack.WmsWarehouseRackFeign; |
|||
import com.yxt.common.core.query.PagerQuery; |
|||
import com.yxt.common.core.result.ResultBean; |
|||
import com.yxt.common.core.vo.PagerVo; |
|||
import org.apache.commons.lang3.StringUtils; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Service; |
|||
import javax.annotation.Resource; |
|||
import java.math.BigDecimal; |
|||
import java.util.ArrayList; |
|||
import java.util.List; |
|||
|
|||
@Service |
|||
public class AppFirstShelvesService { |
|||
|
|||
@Resource |
|||
private WmsGoodsTagFeign wmsGoodsTagFeign; |
|||
@Resource |
|||
private WmsWarehouseRackFeign wmsWarehouseRackFeign; |
|||
@Resource |
|||
private WmsInventoryFeign wmsInventoryFeign; |
|||
@Resource |
|||
private WmsInitialDetailFeign wmsInitialDetailFeign; |
|||
@Autowired |
|||
private SysStaffOrgFeign sysStaffOrgFeign; |
|||
|
|||
public ResultBean<AppFirstShelvesVo> list(PagerQuery<AppFirstShelvesQuery> pagerQuery) { |
|||
ResultBean rb = ResultBean.fireFail(); |
|||
PagerQuery<GoodsTagListQuery> pagerQuery1 = new PagerQuery<>(); |
|||
GoodsTagListQuery params = new GoodsTagListQuery(); |
|||
AppFirstShelvesQuery params1 = pagerQuery.getParams(); |
|||
params.setUserSid(params1.getUserSid()); |
|||
params.setOrgPath(params1.getOrgPath()); |
|||
params.setMenuSid(params1.getMenuSid()); |
|||
params.setName(params1.getName()); |
|||
pagerQuery1.setParams(params); |
|||
pagerQuery1.setSize(1000); |
|||
PagerVo<WmsGoodsTag> data = wmsGoodsTagFeign.goodsTagList(pagerQuery1).getData(); |
|||
AppFirstShelvesVo appFirstShelvesVo = new AppFirstShelvesVo(); |
|||
List<AppFirstShelvesGoodsVo> goods = new ArrayList<>(); |
|||
List<WmsGoodsTag> list = data.getRecords(); |
|||
for (WmsGoodsTag wmsGoodsTag : list) { |
|||
AppFirstShelvesGoodsVo appFirstShelvesGoodsVo = new AppFirstShelvesGoodsVo(); |
|||
appFirstShelvesGoodsVo.setSid(wmsGoodsTag.getSid()); |
|||
appFirstShelvesGoodsVo.setName(wmsGoodsTag.getGoodsSkuTitle()); |
|||
appFirstShelvesGoodsVo.set_id(wmsGoodsTag.getGoodsID()); |
|||
appFirstShelvesGoodsVo.setNum(wmsGoodsTag.getGoodsCount()); |
|||
appFirstShelvesGoodsVo.setUnit(wmsGoodsTag.getUnit()); |
|||
appFirstShelvesGoodsVo.setSpecs(wmsGoodsTag.getGoodsSkuOwnSpec()); |
|||
goods.add(appFirstShelvesGoodsVo); |
|||
} |
|||
appFirstShelvesVo.setGoods(goods); |
|||
return rb.success().setData(appFirstShelvesVo); |
|||
} |
|||
|
|||
public ResultBean<AppFirstShelvesScanVo> scan(String content, String type, String orgPath) { |
|||
ResultBean rb = ResultBean.fireFail(); |
|||
AppFirstShelvesScanVo appFirstShelvesScanVo = new AppFirstShelvesScanVo(); |
|||
if ("0".equals(type)) {//商品码
|
|||
if (content.contains("#")) { |
|||
return rb.setMsg("请扫描商品码"); |
|||
} |
|||
String count = wmsInventoryFeign.selCountByGoodsID(content).getData(); |
|||
BigDecimal num = null; |
|||
if (StringUtils.isNotBlank(count)){ |
|||
num = new BigDecimal(count); |
|||
}else { |
|||
num = new BigDecimal("0"); |
|||
} |
|||
WmsGoodsTag wmsGoodsTag = wmsGoodsTagFeign.selectByGoodsId(content).getData(); |
|||
BigDecimal chae = wmsGoodsTag.getGoodsCount().subtract(num); |
|||
if (chae.compareTo(BigDecimal.ZERO) == 0){ |
|||
return rb.setMsg("该商品已全部入库"); |
|||
} |
|||
appFirstShelvesScanVo.setType(type); |
|||
appFirstShelvesScanVo.setGoodsID(content); |
|||
appFirstShelvesScanVo.setGoodsName(wmsGoodsTag.getGoodsSkuTitle()); |
|||
appFirstShelvesScanVo.setGoodsMax(chae.setScale(0,BigDecimal.ROUND_DOWN).toString()); |
|||
} else if ("1".equals(type)) {//库位码
|
|||
if (!content.contains("#")) { |
|||
return rb.setMsg("请扫描库位码"); |
|||
} |
|||
String[] split = content.split("#"); |
|||
String houseCode = split[0]; |
|||
ResultBean<WmsHouseInfoVo> wmsHouseInfoVoResultBean = wmsWarehouseRackFeign.selHouseInfoByFullCode(houseCode); |
|||
if (wmsHouseInfoVoResultBean.getSuccess()) { |
|||
WmsHouseInfoVo houseInfoVo = wmsHouseInfoVoResultBean.getData(); |
|||
if (null != houseInfoVo) { |
|||
String houseName = ""; |
|||
String areaName = ""; |
|||
String rackName = ""; |
|||
String zoneName = ""; |
|||
if (StringUtils.isNotBlank(houseInfoVo.getWarehouseName())) { |
|||
houseName = houseInfoVo.getWarehouseName(); |
|||
} |
|||
if (StringUtils.isNotBlank(houseInfoVo.getWareAreaName())) { |
|||
areaName = houseInfoVo.getWareAreaName(); |
|||
} |
|||
if (StringUtils.isNotBlank(houseInfoVo.getWarehouseRackName())) { |
|||
rackName = houseInfoVo.getWarehouseRackName(); |
|||
} |
|||
if (StringUtils.isNotBlank(houseInfoVo.getWarehouseZoneName())) { |
|||
zoneName = houseInfoVo.getWarehouseZoneName(); |
|||
} |
|||
appFirstShelvesScanVo.setHouseName(houseName + "-" + zoneName + "-" + areaName); |
|||
appFirstShelvesScanVo.setHouseAddress(houseInfoVo.getWarehouseRackCode()); |
|||
appFirstShelvesScanVo.setHouseCode(houseCode); |
|||
appFirstShelvesScanVo.setType(type); |
|||
} else { |
|||
return rb.setMsg("扫描库位码为空"); |
|||
} |
|||
} |
|||
} |
|||
return rb.success().setData(appFirstShelvesScanVo); |
|||
} |
|||
|
|||
public ResultBean save(AppFirstShelvesDto dto) { |
|||
ResultBean rb = ResultBean.fireFail(); |
|||
List<AppFirstShelvesGoodsDto> goodsList = dto.getGoodsList(); |
|||
WmsInventorySaveDto wmsInventorySaveDto = new WmsInventorySaveDto(); |
|||
wmsInventorySaveDto.setCreateBySid(dto.getUserSid()); |
|||
String useOrgSid = sysStaffOrgFeign.getOrgSidByPath(dto.getOrgPath()).getData(); |
|||
wmsInventorySaveDto.setCreateOrgSid(useOrgSid); |
|||
wmsInventorySaveDto.setUseOrgSid(useOrgSid); |
|||
wmsInventorySaveDto.setFirstInDate(DateUtil.today()); |
|||
for (AppFirstShelvesGoodsDto appFirstShelvesGoodsDto : goodsList) { |
|||
WmsGoodsTag wmsGoodsTag = wmsGoodsTagFeign.selectByGoodsId(appFirstShelvesGoodsDto.getGoodsID()).getData(); |
|||
WmsInitialDetail wmsInitialDetail = wmsInitialDetailFeign.selBySid(wmsGoodsTag.getBillDetailSid()).getData(); |
|||
WmsHouseInfoVo wmsHouseInfoVo = wmsWarehouseRackFeign.selHouseInfoByFullCode(appFirstShelvesGoodsDto.getHouseCode()).getData(); |
|||
wmsInventorySaveDto.setGoodsSpuSid(wmsGoodsTag.getGoodsSpuSid()); |
|||
wmsInventorySaveDto.setGoodsSpuName(wmsGoodsTag.getGoodsSpuName()); |
|||
wmsInventorySaveDto.setGoodsSkuSid(wmsGoodsTag.getGoodsSkuSid()); |
|||
wmsInventorySaveDto.setGoodsSkuTitle(wmsGoodsTag.getGoodsSkuTitle()); |
|||
wmsInventorySaveDto.setGoodsSkuCode(wmsGoodsTag.getGoodsSkuCode()); |
|||
wmsInventorySaveDto.setGoodsSkuOwnSpec(wmsGoodsTag.getGoodsSkuOwnSpec()); |
|||
wmsInventorySaveDto.setUnit(wmsGoodsTag.getUnit()); |
|||
wmsInventorySaveDto.setCount(appFirstShelvesGoodsDto.getCount()); |
|||
wmsInventorySaveDto.setGoodsID(appFirstShelvesGoodsDto.getGoodsID()); |
|||
wmsInventorySaveDto.setManufacturerSid(wmsInitialDetail.getManufacturerSid()); |
|||
wmsInventorySaveDto.setManufacturerName(wmsInitialDetail.getManufacturerName()); |
|||
wmsInventorySaveDto.setFirstInDate(DateUtil.formatDate(wmsInitialDetail.getFirstInDate())); |
|||
wmsInventorySaveDto.setWarehouseSid(wmsHouseInfoVo.getWarehouseSid()); |
|||
wmsInventorySaveDto.setWarehouseName(wmsHouseInfoVo.getWarehouseName()); |
|||
wmsInventorySaveDto.setWarehouseRackSid(wmsHouseInfoVo.getWarehouseRackSid()); |
|||
wmsInventorySaveDto.setWarehouseRackCode(appFirstShelvesGoodsDto.getHouseCode()); |
|||
wmsInventoryFeign.saveWmsInventory(wmsInventorySaveDto).getData(); |
|||
} |
|||
return rb.success(); |
|||
} |
|||
} |
@ -0,0 +1,61 @@ |
|||
package com.yxt.anrui.terminal.fegin.wmsInventory; |
|||
|
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* @description: |
|||
* @author: dimengzhe |
|||
* @date: 2024/4/19 |
|||
**/ |
|||
@Data |
|||
public class WmsInventorySaveDto { |
|||
|
|||
private String sid; |
|||
@ApiModelProperty("创建者sid") |
|||
private String createBySid; |
|||
@ApiModelProperty("批次号(入库日期+生产日期,如240320-240109)") |
|||
private String batchNumber; |
|||
@ApiModelProperty("商品ID(唯一编码,入库时生成,生成规则为商品编码+YYMMdd+4位流水)") |
|||
private String goodsID; |
|||
@ApiModelProperty("商品基础信息sid") |
|||
private String goodsSpuSid; |
|||
@ApiModelProperty("商品名称") |
|||
private String goodsSpuName; |
|||
@ApiModelProperty("商品Skusid") |
|||
private String goodsSkuSid; |
|||
@ApiModelProperty("商品Sku名称") |
|||
private String goodsSkuTitle; |
|||
@ApiModelProperty("商品编码") |
|||
private String goodsSkuCode; |
|||
@ApiModelProperty("规格型号") |
|||
private String goodsSkuOwnSpec; |
|||
@ApiModelProperty("计量单位") |
|||
private String unit; |
|||
@ApiModelProperty("现有量") |
|||
private String count; |
|||
@ApiModelProperty("分配量") |
|||
private String allocateCount; |
|||
@ApiModelProperty("拣货量") |
|||
private String pickCount; |
|||
@ApiModelProperty("冻结量") |
|||
private String freezeCount; |
|||
@ApiModelProperty("仓库sid") |
|||
private String warehouseSid; |
|||
@ApiModelProperty("仓库名称") |
|||
private String warehouseName; |
|||
@ApiModelProperty("库位sid") |
|||
private String warehouseRackSid; |
|||
@ApiModelProperty("库位编码") |
|||
private String warehouseRackCode; |
|||
@ApiModelProperty("厂家sid") |
|||
private String manufacturerSid; |
|||
@ApiModelProperty("厂家名称") |
|||
private String manufacturerName; |
|||
@ApiModelProperty("首次入库日期") |
|||
private String firstInDate; |
|||
@ApiModelProperty("创建组织sid") |
|||
private String createOrgSid; |
|||
@ApiModelProperty("使用组织sid") |
|||
private String useOrgSid; |
|||
} |
@ -0,0 +1,18 @@ |
|||
package com.yxt.anrui.terminal.fegin.wmsgoodstag; |
|||
|
|||
import com.yxt.common.core.query.Query; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* @author Fan |
|||
* @description |
|||
* @date 2024/6/24 15:02 |
|||
*/ |
|||
@Data |
|||
public class GoodsTagListQuery implements Query { |
|||
|
|||
private String menuSid; |
|||
private String userSid; |
|||
private String orgPath; |
|||
private String name; |
|||
} |
@ -0,0 +1,45 @@ |
|||
package com.yxt.anrui.terminal.fegin.wmsgoodstag; |
|||
|
|||
import com.yxt.common.core.domain.BaseEntity; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
import java.math.BigDecimal; |
|||
|
|||
/** |
|||
* @author Fan |
|||
* @description |
|||
* @date 2024/5/30 13:36 |
|||
*/ |
|||
@Data |
|||
public class WmsGoodsTag extends BaseEntity { |
|||
@ApiModelProperty("单据sid(收货单sid)") |
|||
private String billSid; |
|||
@ApiModelProperty("单据明细sid") |
|||
private String billDetailSid; |
|||
@ApiModelProperty("批次号(入库日期+有效日期,如240320-241009)") |
|||
private String batchNumber; |
|||
@ApiModelProperty("商品ID") |
|||
private String goodsID; |
|||
@ApiModelProperty("商品基础信息sid") |
|||
private String goodsSpuSid; |
|||
@ApiModelProperty("商品名称") |
|||
private String goodsSpuName; |
|||
@ApiModelProperty("商品Skusid") |
|||
private String goodsSkuSid; |
|||
@ApiModelProperty("商品Sku名称") |
|||
private String goodsSkuTitle; |
|||
@ApiModelProperty("商品编码(图号)") |
|||
private String goodsSkuCode; |
|||
@ApiModelProperty("规格型号") |
|||
private String goodsSkuOwnSpec; |
|||
@ApiModelProperty("计量单位") |
|||
private String unit; |
|||
@ApiModelProperty("数量") |
|||
private BigDecimal goodsCount; |
|||
@ApiModelProperty("标签图片地址") |
|||
private String tagPicUrl; |
|||
@ApiModelProperty("打印次数") |
|||
private Integer printCount; |
|||
|
|||
} |
@ -0,0 +1,30 @@ |
|||
package com.yxt.anrui.terminal.fegin.wmsgoodstag; |
|||
|
|||
import com.yxt.common.core.query.PagerQuery; |
|||
import com.yxt.common.core.result.ResultBean; |
|||
import com.yxt.common.core.vo.PagerVo; |
|||
import io.swagger.annotations.ApiOperation; |
|||
import org.springframework.cloud.openfeign.FeignClient; |
|||
import org.springframework.web.bind.annotation.PostMapping; |
|||
import org.springframework.web.bind.annotation.RequestBody; |
|||
import org.springframework.web.bind.annotation.RequestParam; |
|||
|
|||
/** |
|||
* @Author |
|||
* @Date |
|||
* @Description |
|||
*/ |
|||
@FeignClient( |
|||
contextId = "terminal-WmsGoodsTag", |
|||
name = "yxt-wms", |
|||
path = "/apiadmin/WmsTagPrint") |
|||
public interface WmsGoodsTagFeign { |
|||
|
|||
@PostMapping("goodsTagList") |
|||
@ApiOperation("商品标签列表") |
|||
ResultBean<PagerVo<WmsGoodsTag>> goodsTagList(@RequestBody PagerQuery<GoodsTagListQuery> pagerQuery); |
|||
|
|||
@ApiOperation("根据商品ID查询标签信息") |
|||
@PostMapping("/selectByGoodsId") |
|||
public ResultBean<WmsGoodsTag> selectByGoodsId(@RequestParam("oldGoodsId") String oldGoodsId); |
|||
} |
@ -0,0 +1,91 @@ |
|||
/********************************************************* |
|||
********************************************************* |
|||
******************** ******************* |
|||
************* ************ |
|||
******* _oo0oo_ ******* |
|||
*** o8888888o *** |
|||
* 88" . "88 * |
|||
* (| -_- |) * |
|||
* 0\ = /0 * |
|||
* ___/`---'\___ * |
|||
* .' \\| |// '. *
|
|||
* / \\||| : |||// \ *
|
|||
* / _||||| -:- |||||- \ * |
|||
* | | \\\ - /// | | *
|
|||
* | \_| ''\---/'' |_/ | * |
|||
* \ .-\__ '-' ___/-. / * |
|||
* ___'. .' /--.--\ `. .'___ * |
|||
* ."" '< `.___\_<|>_/___.' >' "". * |
|||
* | | : `- \`.;`\ _ /`;.`/ - ` : | | * |
|||
* \ \ `_. \_ __\ /__ _/ .-` / / * |
|||
* =====`-.____`.___ \_____/___.-`___.-'===== * |
|||
* `=---=' * |
|||
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * |
|||
*********__佛祖保佑__永无BUG__验收通过__钞票多多__********* |
|||
*********************************************************/ |
|||
package com.yxt.anrui.terminal.fegin.wmsinitialdetail; |
|||
|
|||
import com.fasterxml.jackson.annotation.JsonFormat; |
|||
import com.yxt.common.core.domain.BaseEntity; |
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
import java.math.BigDecimal; |
|||
import java.util.Date; |
|||
|
|||
@Data |
|||
@ApiModel(value = "期初上架-明细", description = "期初上架-明细") |
|||
public class WmsInitialDetail extends BaseEntity { |
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
@ApiModelProperty("单据sid") |
|||
private String billSid; // 单据sid
|
|||
@ApiModelProperty("商品spuSid") |
|||
private String goodsSpuSid; // 商品spuSid
|
|||
@ApiModelProperty("商品spu名称") |
|||
private String goodsSpuName; // 商品spu名称
|
|||
@ApiModelProperty("商品skuSid") |
|||
private String goodsSkuSid; // 商品skuSid
|
|||
@ApiModelProperty("商品sku名称") |
|||
private String goodsSkuTitle; // 商品Sku名称
|
|||
@ApiModelProperty("图号") |
|||
private String goodsSkuCode; // 图号
|
|||
@ApiModelProperty("规格型号") |
|||
private String goodsSkuOwnSpec; // 规格型号
|
|||
@ApiModelProperty("单位") |
|||
private String unit; // 单位
|
|||
@ApiModelProperty("数量") |
|||
private BigDecimal num; // 数量
|
|||
@ApiModelProperty("品牌sid") |
|||
private String brandSid; // 品牌sid
|
|||
@ApiModelProperty("品牌名称") |
|||
private String brandName; // 品牌名称
|
|||
@ApiModelProperty("厂家sid") |
|||
private String manufacturerSid; // 厂家sid
|
|||
@ApiModelProperty("厂家名称") |
|||
private String manufacturerName; // 厂家名称
|
|||
@ApiModelProperty("供应商名称") |
|||
private String supplierName; // 供应商名称
|
|||
@ApiModelProperty("销售指导价") |
|||
private BigDecimal saleGuidePrice; // 销售指导价
|
|||
@ApiModelProperty("入库单价") |
|||
private BigDecimal inCost; // 入库单价
|
|||
@ApiModelProperty("税率") |
|||
private String taxRate; // 税率
|
|||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") |
|||
@ApiModelProperty("首次入库日期") |
|||
private Date firstInDate; // 首次入库日期
|
|||
@ApiModelProperty("商品类别sid") |
|||
private String goodsTypeSid; // 商品类别sid
|
|||
@ApiModelProperty("商品类别编码") |
|||
private String goodsTypeCode; // 商品类别编码
|
|||
@ApiModelProperty("商品类别名称") |
|||
private String goodsTypeName; // 商品类别名称
|
|||
@ApiModelProperty("已上架数量") |
|||
private BigDecimal listNum; // 已上架数量
|
|||
@ApiModelProperty("是否为一物一码") |
|||
private Integer isYwym; |
|||
@ApiModelProperty("是否已上传商品标签") |
|||
private Integer isScbq; |
|||
} |
@ -0,0 +1,27 @@ |
|||
package com.yxt.anrui.terminal.fegin.wmsinitialdetail; |
|||
|
|||
import com.yxt.anrui.terminal.fegin.wmsoldinventory.WmsOldGroundConfirmApp; |
|||
import com.yxt.common.core.result.ResultBean; |
|||
import io.swagger.annotations.ApiOperation; |
|||
import org.springframework.cloud.openfeign.FeignClient; |
|||
import org.springframework.web.bind.annotation.PostMapping; |
|||
import org.springframework.web.bind.annotation.RequestBody; |
|||
import org.springframework.web.bind.annotation.RequestParam; |
|||
import org.springframework.web.bind.annotation.ResponseBody; |
|||
|
|||
/** |
|||
* @Author |
|||
* @Date |
|||
* @Description |
|||
*/ |
|||
@FeignClient( |
|||
contextId = "terminal-WmsInitialDetail", |
|||
name = "yxt-wms", |
|||
path = "v1/wmsinitialdetail") |
|||
public interface WmsInitialDetailFeign { |
|||
|
|||
@PostMapping("/selBySid") |
|||
@ResponseBody |
|||
@ApiOperation(value = "根据sid查询") |
|||
public ResultBean<WmsInitialDetail> selBySid(@RequestParam("sid") String sid); |
|||
} |
@ -0,0 +1,92 @@ |
|||
package com.yxt.anrui.oa.api; |
|||
|
|||
import com.yxt.anrui.oa.biz.adofficesuppliesapply.AdOfficeSuppliesApplyDetailVo; |
|||
import com.yxt.anrui.oa.biz.adofficesuppliesapply.AdOfficeSuppliesApplyDto; |
|||
import com.yxt.anrui.oa.biz.adofficesuppliesapply.AdOfficeSuppliesApplyService; |
|||
import com.yxt.anrui.oa.biz.adofficesuppliesapply.AdOfficeSuppliesApplyVo; |
|||
import com.yxt.anrui.oa.biz.oaform.flowable.CompleteDto; |
|||
import com.yxt.anrui.oa.biz.oaform.flowable.NodeQuery; |
|||
import com.yxt.anrui.oa.biz.oaform.flowable.TaskDto; |
|||
import com.yxt.common.core.result.ResultBean; |
|||
import io.swagger.annotations.Api; |
|||
import io.swagger.annotations.ApiOperation; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.cloud.openfeign.SpringQueryMap; |
|||
import org.springframework.web.bind.annotation.*; |
|||
|
|||
import javax.validation.Valid; |
|||
|
|||
@Api(tags = "办公用品领用申请") |
|||
@RestController |
|||
@RequestMapping("v1/AdOfficeSuppliesApply") |
|||
public class AdOfficeSuppliesApplyRest { |
|||
|
|||
@Autowired |
|||
private AdOfficeSuppliesApplyService adOfficeSuppliesApplyService; |
|||
|
|||
@ApiOperation("初始化(新增或修改)") |
|||
@GetMapping({"/getInit", "/getInit/{sid}"}) |
|||
public ResultBean<AdOfficeSuppliesApplyVo> getInit( |
|||
@PathVariable(value = "sid", required = false) String sid, |
|||
@RequestParam(value = "userSid", required = false) String userSid, |
|||
@RequestParam(value = "orgPath", required = false) String orgPath) { |
|||
ResultBean<AdOfficeSuppliesApplyVo> rb = ResultBean.fireFail(); |
|||
if (sid == null || sid.isEmpty()) { |
|||
// 执行新增初始化
|
|||
if (userSid == null || orgPath == null) { |
|||
return rb.setMsg("userSid和orgPath不能为空"); |
|||
} |
|||
return adOfficeSuppliesApplyService.getSaveInit(userSid, orgPath); |
|||
} else { |
|||
// 执行修改初始化
|
|||
return adOfficeSuppliesApplyService.getUpdateInit(sid); |
|||
} |
|||
} |
|||
|
|||
@ApiOperation("新增或修改") |
|||
@PostMapping("/save") |
|||
public ResultBean save(@RequestBody AdOfficeSuppliesApplyDto dto) { |
|||
return adOfficeSuppliesApplyService.saveOrUpdateDto(dto); |
|||
} |
|||
|
|||
@ApiOperation("详情") |
|||
@GetMapping("/details/{sid}") |
|||
ResultBean<AdOfficeSuppliesApplyDetailVo> details(@PathVariable("sid") String sid |
|||
, @RequestParam(value = "application", required = false) String application) { |
|||
return adOfficeSuppliesApplyService.details(sid,application); |
|||
} |
|||
|
|||
@ApiOperation("根据sid批量删除") |
|||
@DeleteMapping("/delBySids") |
|||
public ResultBean delBySids(@RequestBody String[] sids) { |
|||
ResultBean rb = ResultBean.fireFail(); |
|||
adOfficeSuppliesApplyService.delAll(sids); |
|||
return rb.success(); |
|||
} |
|||
|
|||
@ApiOperation("提交审批流程") |
|||
@PostMapping("/submit") |
|||
public ResultBean submit(@RequestBody AdOfficeSuppliesApplyDto dto) { |
|||
return adOfficeSuppliesApplyService.submit(dto); |
|||
} |
|||
|
|||
@ApiOperation(value = "办理(同意)") |
|||
@PutMapping("/complete") |
|||
public ResultBean complete(@Valid @RequestBody CompleteDto dto) { |
|||
return adOfficeSuppliesApplyService.complete(dto); |
|||
} |
|||
|
|||
@ApiOperation(value = "驳回任务") |
|||
@PutMapping(value = "/reject") |
|||
public ResultBean reject(@Valid @RequestBody TaskDto dto) { |
|||
return adOfficeSuppliesApplyService.reject(dto); |
|||
} |
|||
|
|||
@ApiOperation("获取流程操作标题") |
|||
@GetMapping("/getFlowOperateTitle") |
|||
@ResponseBody |
|||
ResultBean<String> getFlowOperateTitle(@SpringQueryMap NodeQuery query) { |
|||
return adOfficeSuppliesApplyService.getFlowOperateTitle(query); |
|||
} |
|||
|
|||
} |
@ -0,0 +1,54 @@ |
|||
/********************************************************* |
|||
********************************************************* |
|||
******************** ******************* |
|||
************* ************ |
|||
******* _oo0oo_ ******* |
|||
*** o8888888o *** |
|||
* 88" . "88 * |
|||
* (| -_- |) * |
|||
* 0\ = /0 * |
|||
* ___/`---'\___ * |
|||
* .' \\| |// '. *
|
|||
* / \\||| : |||// \ *
|
|||
* / _||||| -:- |||||- \ * |
|||
* | | \\\ - /// | | *
|
|||
* | \_| ''\---/'' |_/ | * |
|||
* \ .-\__ '-' ___/-. / * |
|||
* ___'. .' /--.--\ `. .'___ * |
|||
* ."" '< `.___\_<|>_/___.' >' "". * |
|||
* | | : `- \`.;`\ _ /`;.`/ - ` : | | * |
|||
* \ \ `_. \_ __\ /__ _/ .-` / / * |
|||
* =====`-.____`.___ \_____/___.-`___.-'===== * |
|||
* `=---=' * |
|||
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * |
|||
*********__佛祖保佑__永无BUG__验收通过__钞票多多__********* |
|||
*********************************************************/ |
|||
package com.yxt.anrui.oa.biz.adbeverageacceptanceapply; |
|||
|
|||
import com.baomidou.mybatisplus.annotation.TableName; |
|||
import com.yxt.common.core.domain.BaseEntity; |
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
@Data |
|||
@ApiModel(value = "集团用酒领用申请", description = "集团用酒领用申请") |
|||
@TableName("ad_beverage_acceptance_apply") |
|||
public class AdBeverageAcceptanceApply extends BaseEntity { |
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
@ApiModelProperty("基础表单sid") |
|||
private String formSid; // 基础表单sid
|
|||
@ApiModelProperty("关联审批sid列表,英文逗号分隔") |
|||
private String linkFormSids; // 关联审批sid列表,英文逗号分隔
|
|||
@ApiModelProperty("用途分类key") |
|||
private String useTypeKey; // 用途分类key
|
|||
@ApiModelProperty("用途分类value") |
|||
private String useTypeValue; // 用途分类value
|
|||
@ApiModelProperty("费用承担部门sid") |
|||
private String feesDeptSid; // 费用承担部门sid
|
|||
@ApiModelProperty("费用承担部门") |
|||
private String feesDept; // 费用承担部门
|
|||
@ApiModelProperty("具体用途") |
|||
private String specificUses; // 具体用途
|
|||
} |
@ -0,0 +1,41 @@ |
|||
package com.yxt.anrui.oa.biz.adbeverageacceptanceapply; |
|||
|
|||
import com.yxt.anrui.oa.biz.oaform.FormCommon; |
|||
import com.yxt.anrui.oa.biz.oaform.OaFormCommonVo; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
import java.util.ArrayList; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @description: |
|||
* @author: dimengzhe |
|||
* @date: 2025/1/21 |
|||
**/ |
|||
@Data |
|||
public class AdBeverageAcceptanceApplyDetailVo extends OaFormCommonVo { |
|||
|
|||
@ApiModelProperty("备注") |
|||
private String remarks; |
|||
@ApiModelProperty("用途分类key") |
|||
private String useTypeKey; // 用途分类key
|
|||
@ApiModelProperty("用途分类value") |
|||
private String useTypeValue; // 用途分类value
|
|||
@ApiModelProperty("费用承担部门sid") |
|||
private String feesDeptSid; // 费用承担部门sid
|
|||
@ApiModelProperty("费用承担部门") |
|||
private String feesDept; // 费用承担部门
|
|||
@ApiModelProperty("具体用途") |
|||
private String specificUses; // 具体用途
|
|||
@ApiModelProperty("费用承担部门obj") |
|||
private FormCommon feesDeptObj; // 费用承担部门obj
|
|||
@ApiModelProperty("用途分类obj") |
|||
private FormCommon useTypeObj; // 用途分类obj
|
|||
@ApiModelProperty("图片") |
|||
private List<String> files = new ArrayList<>(); |
|||
@ApiModelProperty("附件") |
|||
private List<String> appes = new ArrayList<>(); |
|||
|
|||
private List<FormCommon> list = new ArrayList<>(); //酒品明细
|
|||
} |
@ -0,0 +1,59 @@ |
|||
/********************************************************* |
|||
********************************************************* |
|||
******************** ******************* |
|||
************* ************ |
|||
******* _oo0oo_ ******* |
|||
*** o8888888o *** |
|||
* 88" . "88 * |
|||
* (| -_- |) * |
|||
* 0\ = /0 * |
|||
* ___/`---'\___ * |
|||
* .' \\| |// '. *
|
|||
* / \\||| : |||// \ *
|
|||
* / _||||| -:- |||||- \ * |
|||
* | | \\\ - /// | | *
|
|||
* | \_| ''\---/'' |_/ | * |
|||
* \ .-\__ '-' ___/-. / * |
|||
* ___'. .' /--.--\ `. .'___ * |
|||
* ."" '< `.___\_<|>_/___.' >' "". * |
|||
* | | : `- \`.;`\ _ /`;.`/ - ` : | | * |
|||
* \ \ `_. \_ __\ /__ _/ .-` / / * |
|||
* =====`-.____`.___ \_____/___.-`___.-'===== * |
|||
* `=---=' * |
|||
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * |
|||
*********__佛祖保佑__永无BUG__验收通过__钞票多多__********* |
|||
*********************************************************/ |
|||
package com.yxt.anrui.oa.biz.adbeverageacceptanceapply; |
|||
|
|||
|
|||
import com.yxt.anrui.oa.biz.oaform.FormCommon; |
|||
import com.yxt.anrui.oa.biz.oaform.OaFormDto; |
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
import java.util.ArrayList; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* Project: oa(驻外人员认定申请) <br/> |
|||
* File: AdExpatriatesApplyDto.java <br/> |
|||
* Class: com.yxt.anrui.oa.api.adexpatriatesapply.AdExpatriatesApplyDto <br/> |
|||
* Description: 驻外人员认定申请 数据传输对象. <br/> |
|||
* Copyright: Copyright (c) 2011 <br/> |
|||
* Company: https://gitee.com/liuzp315 <br/>
|
|||
* Makedate: 2025-01-16 15:22:53 <br/> |
|||
* |
|||
* @author liupopo |
|||
* @version 1.0 |
|||
* @since 1.0 |
|||
*/ |
|||
@Data |
|||
@ApiModel(value = "驻外人员认定申请 数据传输对象", description = "驻外人员认定申请 数据传输对象") |
|||
public class AdBeverageAcceptanceApplyDto extends OaFormDto { |
|||
|
|||
@ApiModelProperty("备注") |
|||
private String remarks; |
|||
|
|||
private List<FormCommon> list = new ArrayList<>(); |
|||
} |
@ -0,0 +1,37 @@ |
|||
/********************************************************* |
|||
********************************************************* |
|||
******************** ******************* |
|||
************* ************ |
|||
******* _oo0oo_ ******* |
|||
*** o8888888o *** |
|||
* 88" . "88 * |
|||
* (| -_- |) * |
|||
* 0\ = /0 * |
|||
* ___/`---'\___ * |
|||
* .' \\| |// '. *
|
|||
* / \\||| : |||// \ *
|
|||
* / _||||| -:- |||||- \ * |
|||
* | | \\\ - /// | | *
|
|||
* | \_| ''\---/'' |_/ | * |
|||
* \ .-\__ '-' ___/-. / * |
|||
* ___'. .' /--.--\ `. .'___ * |
|||
* ."" '< `.___\_<|>_/___.' >' "". * |
|||
* | | : `- \`.;`\ _ /`;.`/ - ` : | | * |
|||
* \ \ `_. \_ __\ /__ _/ .-` / / * |
|||
* =====`-.____`.___ \_____/___.-`___.-'===== * |
|||
* `=---=' * |
|||
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * |
|||
*********__佛祖保佑__永无BUG__验收通过__钞票多多__********* |
|||
*********************************************************/ |
|||
package com.yxt.anrui.oa.biz.adbeverageacceptanceapply; |
|||
|
|||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
|
|||
@Mapper |
|||
public interface AdBeverageAcceptanceApplyMapper extends BaseMapper<AdBeverageAcceptanceApply> { |
|||
|
|||
int selectBySid(String join); |
|||
|
|||
AdBeverageAcceptanceApplyDetailVo details(String sid); |
|||
} |
@ -0,0 +1,39 @@ |
|||
<?xml version="1.0" encoding="UTF-8" ?> |
|||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|||
<mapper namespace="com.yxt.anrui.oa.biz.adofficesuppliesapply.AdOfficeSuppliesApplyMapper"> |
|||
<!-- <where> ${ew.sqlSegment} </where>--> |
|||
<!-- ${ew.customSqlSegment} --> |
|||
|
|||
<select id="selectBySid" resultType="int"> |
|||
SELECT COUNT(*) |
|||
FROM ad_office_supplies_apply ae |
|||
left join oa_form ofm on ae.formSid = ofm.sid |
|||
WHERE ofm.nodeState != '待提交' |
|||
and find_in_set(oa.sid, #{list}) |
|||
</select> |
|||
|
|||
<select id="details" resultMap="detailMap"> |
|||
select remarks, sid |
|||
from ad_office_supplies_apply |
|||
where sid = #{sid} |
|||
</select> |
|||
|
|||
<resultMap id="detailMap" type="com.yxt.anrui.oa.biz.adexpatriatesapply.AdExpatriatesApplyDetailVo"> |
|||
<result column="remarks" property="remarks"/> |
|||
<collection property="list" ofType="com.yxt.anrui.oa.biz.adexpatriatesdetail.AdExpatriatesListDetailVo" |
|||
select="selectList" column="sid"> |
|||
</collection> |
|||
</resultMap> |
|||
|
|||
<select id="selectList" resultType="com.yxt.anrui.oa.biz.adexpatriatesdetail.AdExpatriatesListDetailVo"> |
|||
select sid, |
|||
expatriatesName expatriatesValue, |
|||
expatriatesDeptName deptValue, |
|||
expatriatesPostName jobValue, |
|||
expatriatesHomeAddress, |
|||
expatriatesWorkAddress, |
|||
expatriatesDate |
|||
from ad_expatriates_detail |
|||
where mainSid = #{sid} |
|||
</select> |
|||
</mapper> |
@ -0,0 +1,343 @@ |
|||
/********************************************************* |
|||
********************************************************* |
|||
******************** ******************* |
|||
************* ************ |
|||
******* _oo0oo_ ******* |
|||
*** o8888888o *** |
|||
* 88" . "88 * |
|||
* (| -_- |) * |
|||
* 0\ = /0 * |
|||
* ___/`---'\___ * |
|||
* .' \\| |// '. *
|
|||
* / \\||| : |||// \ *
|
|||
* / _||||| -:- |||||- \ * |
|||
* | | \\\ - /// | | *
|
|||
* | \_| ''\---/'' |_/ | * |
|||
* \ .-\__ '-' ___/-. / * |
|||
* ___'. .' /--.--\ `. .'___ * |
|||
* ."" '< `.___\_<|>_/___.' >' "". * |
|||
* | | : `- \`.;`\ _ /`;.`/ - ` : | | * |
|||
* \ \ `_. \_ __\ /__ _/ .-` / / * |
|||
* =====`-.____`.___ \_____/___.-`___.-'===== * |
|||
* `=---=' * |
|||
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * |
|||
*********__佛祖保佑__永无BUG__验收通过__钞票多多__********* |
|||
*********************************************************/ |
|||
package com.yxt.anrui.oa.biz.adbeverageacceptanceapply; |
|||
|
|||
import cn.hutool.core.bean.BeanUtil; |
|||
import com.yxt.anrui.oa.biz.adofficesuppliesdetail.AdOfficeSuppliesDetailService; |
|||
import com.yxt.anrui.oa.biz.adofficesuppliesdetail.AdOfficeSuppliesDetailVo; |
|||
import com.yxt.anrui.oa.biz.oaappendix.OaAppendixService; |
|||
import com.yxt.anrui.oa.biz.oaform.*; |
|||
import com.yxt.anrui.oa.biz.oaform.flowable.*; |
|||
import com.yxt.anrui.oa.feign.flowable.flow.ProcDefEnum; |
|||
import com.yxt.anrui.oa.feign.portal.sysorganization.SysOrganizationFeign; |
|||
import com.yxt.anrui.oa.feign.portal.sysorganization.SysOrganizationVo; |
|||
import com.yxt.common.base.service.MybatisBaseService; |
|||
import com.yxt.common.core.result.ResultBean; |
|||
import org.apache.commons.lang3.StringUtils; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Service; |
|||
|
|||
import java.util.*; |
|||
|
|||
@Service |
|||
public class AdBeverageAcceptanceApplyService extends MybatisBaseService<AdBeverageAcceptanceApplyMapper, AdBeverageAcceptanceApply> { |
|||
|
|||
@Autowired |
|||
private OaAppendixService oaAppendixService; |
|||
@Autowired |
|||
private OaFormService oaFormService; |
|||
@Autowired |
|||
private AdOfficeSuppliesDetailService adOfficeSuppliesDetailService; |
|||
@Autowired |
|||
private SysOrganizationFeign sysOrganizationFeign; |
|||
|
|||
public ResultBean<AdBeverageAcceptanceApplyVo> getSaveInit(String userSid, String orgPath) { |
|||
ResultBean<AdBeverageAcceptanceApplyVo> rb = ResultBean.fireFail(); |
|||
AdBeverageAcceptanceApplyVo adOfficeSuppliesApplyVo = new AdBeverageAcceptanceApplyVo(); |
|||
adOfficeSuppliesApplyVo.setCreateBySid(userSid); |
|||
adOfficeSuppliesApplyVo.setOrgSidPath(orgPath); |
|||
return rb.success().setData(adOfficeSuppliesApplyVo); |
|||
} |
|||
|
|||
public ResultBean<AdBeverageAcceptanceApplyVo> getUpdateInit(String sid) { |
|||
ResultBean<AdBeverageAcceptanceApplyVo> rb = ResultBean.fireFail(); |
|||
AdBeverageAcceptanceApplyVo adOfficeSuppliesApplyVo = new AdBeverageAcceptanceApplyVo(); |
|||
AdBeverageAcceptanceApply adOfficeSuppliesApply = fetchBySid(sid); |
|||
if (adOfficeSuppliesApply == null) { |
|||
return rb.setMsg("该申请不存在"); |
|||
} |
|||
OaForm oaForm = oaFormService.fetchBySid(sid); |
|||
adOfficeSuppliesApplyVo.setTaskId(oaForm.getTaskId()); |
|||
adOfficeSuppliesApplyVo.setProcInsId(oaForm.getProcInstId()); |
|||
//根据部门sid获取orgPath并赋值
|
|||
SysOrganizationVo organizationVo = sysOrganizationFeign.fetchBySid(oaForm.getDeptSid()).getData(); |
|||
String orgSidPath = organizationVo.getOrgSidPath(); |
|||
adOfficeSuppliesApplyVo.setOrgSidPath(orgSidPath); |
|||
adOfficeSuppliesApplyVo.setCreateBySid(oaForm.getCreateBySid()); |
|||
BeanUtil.copyProperties(adOfficeSuppliesApply, adOfficeSuppliesApplyVo); |
|||
List<AdOfficeSuppliesDetailVo> list = adOfficeSuppliesDetailService.getUpdateInit(sid); |
|||
list.removeAll(Collections.singleton(null)); |
|||
List<FormCommon> officeObj = new ArrayList<>(); |
|||
if (!list.isEmpty()) { |
|||
for (AdOfficeSuppliesDetailVo d : list) { |
|||
FormCommon formCommon = new FormCommon(); |
|||
Map<String, Object> extra = new HashMap<>(); |
|||
formCommon.setId(d.getInventorySid()); |
|||
formCommon.setDictValue(d.getGoodsSpuName()); |
|||
if (StringUtils.isNotBlank(d.getCount())) { |
|||
extra.put("count",d.getCount()); |
|||
} |
|||
if (StringUtils.isNotBlank(d.getGoodsSkuOwnSpec())) { |
|||
extra.put("goodsSkuOwnSpec",d.getGoodsSkuOwnSpec()); |
|||
} |
|||
if (StringUtils.isNotBlank(d.getGoodsSkuSid())) { |
|||
extra.put("goodsSkuSid",d.getGoodsSkuSid()); |
|||
} |
|||
if (StringUtils.isNotBlank(d.getGoodsSpuSid())) { |
|||
extra.put("goodsSpuSid",d.getGoodsSpuSid()); |
|||
} |
|||
if (StringUtils.isNotBlank(d.getUnit())) { |
|||
extra.put("unit",d.getUnit()); |
|||
} |
|||
formCommon.setExtra(extra); |
|||
officeObj.add(formCommon); |
|||
} |
|||
} |
|||
adOfficeSuppliesApplyVo.setList(officeObj); |
|||
adOfficeSuppliesApplyVo.setSid(sid); |
|||
return rb.success().setData(adOfficeSuppliesApplyVo); |
|||
} |
|||
|
|||
public ResultBean<String> saveOrUpdateDto(AdBeverageAcceptanceApplyDto dto) { |
|||
ResultBean<String> rb = ResultBean.fireFail(); |
|||
String sid = dto.getSid(); |
|||
List<FormCommon> list = dto.getList(); |
|||
if (StringUtils.isBlank(sid)) { |
|||
// 新建操作
|
|||
AdBeverageAcceptanceApply entity = new AdBeverageAcceptanceApply(); |
|||
BeanUtil.copyProperties(dto, entity, "sid"); |
|||
|
|||
dto.setBillNo("BGYPLY"); |
|||
dto.setSid(entity.getSid()); |
|||
ResultBean<String> resultBean = oaFormService.saveOaForm(dto); |
|||
|
|||
if (!resultBean.getSuccess()) { |
|||
return rb; |
|||
} |
|||
|
|||
entity.setFormSid(resultBean.getData()); |
|||
baseMapper.insert(entity); |
|||
sid = entity.getSid(); |
|||
} else { |
|||
// 更新操作
|
|||
AdBeverageAcceptanceApply entity = fetchBySid(sid); |
|||
BeanUtil.copyProperties(dto, entity, "id", "sid"); |
|||
baseMapper.updateById(entity); |
|||
} |
|||
adOfficeSuppliesDetailService.saveDetails(list, sid); |
|||
return rb.success().setData(sid); |
|||
} |
|||
|
|||
|
|||
public ResultBean delAll(String[] sids) { |
|||
ResultBean rb = ResultBean.fireFail(); |
|||
//查询该sid中是否有流程不是待提交的
|
|||
int count = baseMapper.selectBySid(StringUtils.join(sids, ",")); |
|||
if (count > 0) { |
|||
return rb.setMsg("删除的数据中包含已提交或已办结审批的数据,删除失败"); |
|||
} |
|||
delBySids(sids); |
|||
return rb.success(); |
|||
} |
|||
|
|||
public ResultBean<AdBeverageAcceptanceApplyDetailVo> details(String sid, String application) { |
|||
ResultBean<AdBeverageAcceptanceApplyDetailVo> rb = ResultBean.fireFail(); |
|||
AdBeverageAcceptanceApplyDetailVo adOfficeSuppliesApplyDetailVo = baseMapper.details(sid); |
|||
if (adOfficeSuppliesApplyDetailVo == null) { |
|||
return rb.setMsg("该申请不存在"); |
|||
} |
|||
//基础字段赋值
|
|||
BeanUtil.copyProperties(oaFormService.getDetails(sid), adOfficeSuppliesApplyDetailVo); |
|||
List<FormCommon> obj = new ArrayList<>(); |
|||
List<AdOfficeSuppliesDetailVo> detailVos = adOfficeSuppliesDetailService.getUpdateInit(sid); |
|||
if (!detailVos.isEmpty()) { |
|||
for (AdOfficeSuppliesDetailVo d : detailVos) { |
|||
FormCommon formCommon = new FormCommon(); |
|||
Map<String, Object> extra = new HashMap<>(); |
|||
formCommon.setId(d.getInventorySid()); |
|||
formCommon.setDictValue(d.getGoodsSpuName()); |
|||
if (StringUtils.isNotBlank(d.getCount())) { |
|||
extra.put("count",d.getCount()); |
|||
} |
|||
if (StringUtils.isNotBlank(d.getGoodsSkuOwnSpec())) { |
|||
extra.put("goodsSkuOwnSpec",d.getGoodsSkuOwnSpec()); |
|||
} |
|||
if (StringUtils.isNotBlank(d.getGoodsSkuSid())) { |
|||
extra.put("goodsSkuSid",d.getGoodsSkuSid()); |
|||
} |
|||
if (StringUtils.isNotBlank(d.getGoodsSpuSid())) { |
|||
extra.put("goodsSpuSid",d.getGoodsSpuSid()); |
|||
} |
|||
if (StringUtils.isNotBlank(d.getUnit())) { |
|||
extra.put("unit",d.getUnit()); |
|||
} |
|||
formCommon.setExtra(extra); |
|||
obj.add(formCommon); |
|||
} |
|||
} |
|||
adOfficeSuppliesApplyDetailVo.setList(obj); |
|||
return rb.success().setData(adOfficeSuppliesApplyDetailVo); |
|||
} |
|||
|
|||
/** |
|||
* 提交 |
|||
* |
|||
* @param dto |
|||
* @return |
|||
*/ |
|||
public ResultBean submit(AdBeverageAcceptanceApplyDto dto) { |
|||
ResultBean rb = ResultBean.fireFail(); |
|||
ResultBean<String> stringResultBean = saveOrUpdateDto(dto); |
|||
if (!stringResultBean.getSuccess()) { |
|||
return rb.setMsg(stringResultBean.getData()); |
|||
} |
|||
String businessSid = stringResultBean.getData(); |
|||
|
|||
SubmitDto submitDto = new SubmitDto(); |
|||
submitDto.setUserSid(dto.getCreateBySid()); |
|||
submitDto.setBusinessSid(businessSid); |
|||
|
|||
Map<String, Object> formVariables = new HashMap<>(); |
|||
formVariables = getMap(formVariables, businessSid); |
|||
submitDto.setFormVariables(formVariables); |
|||
submitDto.setProcDefId(ProcDefEnum.BGYPLYAPPLY.getProDefId()); |
|||
submitDto.setNextTaskId(dto.getTaskId()); |
|||
submitDto.setRule(OaFormRuleEnum.DIRECTLY_UNDER.getRule()); |
|||
return oaFormService.submit(submitDto); |
|||
} |
|||
|
|||
/** |
|||
* 办理(同意) |
|||
* |
|||
* @param dto |
|||
* @return |
|||
*/ |
|||
public ResultBean complete(CompleteDto dto) { |
|||
Map<String, Object> formVariables = dto.getFormVariables(); |
|||
formVariables = getMap(formVariables, dto.getBusinessSid()); |
|||
dto.setFormVariables(formVariables); |
|||
BusinessVariablesDto businessVariablesDto = new BusinessVariablesDto(); |
|||
BeanUtil.copyProperties(dto, businessVariablesDto); |
|||
return oaFormService.complete(businessVariablesDto); |
|||
} |
|||
|
|||
/** |
|||
* 驳回 |
|||
* |
|||
* @param dto |
|||
* @return |
|||
*/ |
|||
public ResultBean reject(TaskDto dto) { |
|||
Map<String, Object> formVariables = dto.getFormVariables(); |
|||
formVariables = getMap(formVariables, dto.getBusinessSid()); |
|||
dto.setFormVariables(formVariables); |
|||
return oaFormService.reject(dto); |
|||
} |
|||
|
|||
public ResultBean<String> getFlowOperateTitle(NodeQuery query) { |
|||
// 默认失败返回
|
|||
ResultBean<String> rb = ResultBean.fireFail(); |
|||
|
|||
// 获取next值和formVariables
|
|||
int next = query.getNext(); |
|||
|
|||
// 获取并更新formVariables
|
|||
Map<String, Object> formVariables = getMap(query.getFormVariables(), query.getBusinessSid()); |
|||
query.setFormVariables(formVariables); |
|||
|
|||
// 校验next参数是否有效(只允许0或1)
|
|||
if (next != 0 && next != 1) { |
|||
return rb.setMsg("参数错误:next"); // 如果next不是0或1,返回错误信息
|
|||
} |
|||
|
|||
// 获取节点名称
|
|||
String data = getNodeName(query, next); |
|||
|
|||
// 如果data为null,表示未获取到有效的节点信息
|
|||
if (data == null) { |
|||
return rb.setMsg("没有获取到节点信息"); // 返回错误消息
|
|||
} |
|||
|
|||
// 返回成功的结果和获取到的节点名称
|
|||
return rb.success().setData(data); |
|||
} |
|||
|
|||
/** |
|||
* 网关参数组成 |
|||
* |
|||
* @param formVariables |
|||
* @param sid |
|||
* @return |
|||
*/ |
|||
public Map<String, Object> getMap(Map<String, Object> formVariables, String sid) { |
|||
Map<String, Object> appMap = new HashMap<>(); |
|||
appMap.put("sid", sid); |
|||
/*appMap.put("editUrl", "approval/#/pages/EditOnboradingApplyActivity?sid=" + sid); |
|||
appMap.put("detailUrl", "approval/#/pages/DetailOnboradingApplyActivity?sid=" + sid); |
|||
appMap.put("flowOperateUrl", "oa/v1/HrHireApply/getFlowOperateTitle"); |
|||
appMap.put("agreeUrl", "oa/v1/HrHireApply/complete"); |
|||
appMap.put("stopUrl", "oa/v1/oaform/breakProcess"); |
|||
appMap.put("rejectUrl", "oa/v1/HrHireApply/reject"); |
|||
appMap.put("recallUrl", "oa/v1/oaform/revokeProcess"); |
|||
appMap.put("signUrl", "oa/v1/oaform/delegate"); |
|||
appMap.put("transferUrl", "oa/v1/oaform/assignTask");*/ |
|||
appMap.put(OaFormUrlEnum.HRHIREAPPLY_EDIT.getType(), OaFormUrlEnum.HRHIREAPPLY_EDIT.getUrl() + "?sid=" + sid); |
|||
appMap.put(OaFormUrlEnum.HRHIREAPPLY_DETAIL.getType(), OaFormUrlEnum.HRHIREAPPLY_DETAIL.getUrl() + "?sid=" + sid); |
|||
appMap.put(OaFormUrlEnum.HRHIREAPPLY_FLOWOPERATEURL.getType(), OaFormUrlEnum.HRHIREAPPLY_FLOWOPERATEURL.getUrl()); |
|||
appMap.put(OaFormUrlEnum.HRHIREAPPLY_AGREEURL.getType(), OaFormUrlEnum.HRHIREAPPLY_AGREEURL.getUrl()); |
|||
appMap.put(OaFormUrlEnum.STOPURL.getType(), OaFormUrlEnum.STOPURL.getUrl()); |
|||
appMap.put(OaFormUrlEnum.HRHIREAPPLY_REJECTURL.getType(), OaFormUrlEnum.HRHIREAPPLY_REJECTURL.getUrl()); |
|||
appMap.put(OaFormUrlEnum.RECALLURL.getType(), OaFormUrlEnum.RECALLURL.getUrl()); |
|||
appMap.put(OaFormUrlEnum.SIGNURL.getType(), OaFormUrlEnum.SIGNURL.getUrl()); |
|||
appMap.put(OaFormUrlEnum.TRANSFERURL.getType(), OaFormUrlEnum.TRANSFERURL.getUrl()); |
|||
formVariables.put("app", appMap); |
|||
//根据组织查询是否是分公司
|
|||
OaForm oaForm = oaFormService.fetchBySid(sid); |
|||
AdBeverageAcceptanceApply adOfficeSuppliesApply = fetchBySid(sid); |
|||
SysOrganizationVo sysOrganization = sysOrganizationFeign.fetchBySid(oaForm.getUseOrgSid()).getData(); |
|||
//是否是分公司
|
|||
formVariables.put("isTrue", sysOrganization.getIsDept() == 0); |
|||
return formVariables; |
|||
} |
|||
|
|||
/** |
|||
* 根据next的值获取前一个节点或下一个节点的名称。 |
|||
* |
|||
* @param query 包含查询所需参数的NodeQuery对象 |
|||
* @param next 参数,0表示上一环节,1表示下一环节 |
|||
* @return 节点名称,如果失败则返回null |
|||
*/ |
|||
private String getNodeName(NodeQuery query, int next) { |
|||
// 根据next值选择相应的服务方法获取节点信息
|
|||
ResultBean<List<NodeVo>> resultBean = (next == 0) |
|||
? oaFormService.getPreviousNodesForReject(query) // 获取上一环节的节点
|
|||
: oaFormService.getNextNodesForSubmit(query); // 获取下一环节的节点
|
|||
// 如果服务调用成功
|
|||
if (resultBean.getSuccess()) { |
|||
// 清除结果列表中的null值,避免空节点
|
|||
resultBean.getData().removeAll(Collections.singleton(null)); |
|||
// 如果结果列表非空,返回第一个节点的名称
|
|||
if (!resultBean.getData().isEmpty()) { |
|||
return resultBean.getData().get(0).getName(); |
|||
} |
|||
} else { |
|||
// 如果服务调用失败,返回null
|
|||
return null; |
|||
} |
|||
// 如果结果为空,返回null
|
|||
return null; |
|||
} |
|||
} |
@ -0,0 +1,53 @@ |
|||
/********************************************************* |
|||
********************************************************* |
|||
******************** ******************* |
|||
************* ************ |
|||
******* _oo0oo_ ******* |
|||
*** o8888888o *** |
|||
* 88" . "88 * |
|||
* (| -_- |) * |
|||
* 0\ = /0 * |
|||
* ___/`---'\___ * |
|||
* .' \\| |// '. *
|
|||
* / \\||| : |||// \ *
|
|||
* / _||||| -:- |||||- \ * |
|||
* | | \\\ - /// | | *
|
|||
* | \_| ''\---/'' |_/ | * |
|||
* \ .-\__ '-' ___/-. / * |
|||
* ___'. .' /--.--\ `. .'___ * |
|||
* ."" '< `.___\_<|>_/___.' >' "". * |
|||
* | | : `- \`.;`\ _ /`;.`/ - ` : | | * |
|||
* \ \ `_. \_ __\ /__ _/ .-` / / * |
|||
* =====`-.____`.___ \_____/___.-`___.-'===== * |
|||
* `=---=' * |
|||
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * |
|||
*********__佛祖保佑__永无BUG__验收通过__钞票多多__********* |
|||
*********************************************************/ |
|||
package com.yxt.anrui.oa.biz.adbeverageacceptanceapply; |
|||
|
|||
import com.yxt.anrui.oa.biz.oaform.FormCommon; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
import java.util.ArrayList; |
|||
import java.util.List; |
|||
|
|||
@Data |
|||
public class AdBeverageAcceptanceApplyVo { |
|||
|
|||
private String sid; |
|||
/* private String userSid; |
|||
private String orgPath;*/ |
|||
private String orgSidPath; |
|||
private String createBySid; |
|||
|
|||
@ApiModelProperty("备注") |
|||
private String remarks; |
|||
private List<FormCommon> list = new ArrayList<>(); |
|||
|
|||
private String taskId; |
|||
@ApiModelProperty("流程实例id") |
|||
private String procInsId; |
|||
|
|||
// private String testPage;
|
|||
} |
@ -0,0 +1,77 @@ |
|||
/********************************************************* |
|||
********************************************************* |
|||
******************** ******************* |
|||
************* ************ |
|||
******* _oo0oo_ ******* |
|||
*** o8888888o *** |
|||
* 88" . "88 * |
|||
* (| -_- |) * |
|||
* 0\ = /0 * |
|||
* ___/`---'\___ * |
|||
* .' \\| |// '. *
|
|||
* / \\||| : |||// \ *
|
|||
* / _||||| -:- |||||- \ * |
|||
* | | \\\ - /// | | *
|
|||
* | \_| ''\---/'' |_/ | * |
|||
* \ .-\__ '-' ___/-. / * |
|||
* ___'. .' /--.--\ `. .'___ * |
|||
* ."" '< `.___\_<|>_/___.' >' "". * |
|||
* | | : `- \`.;`\ _ /`;.`/ - ` : | | * |
|||
* \ \ `_. \_ __\ /__ _/ .-` / / * |
|||
* =====`-.____`.___ \_____/___.-`___.-'===== * |
|||
* `=---=' * |
|||
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * |
|||
*********__佛祖保佑__永无BUG__验收通过__钞票多多__********* |
|||
*********************************************************/ |
|||
package com.yxt.anrui.oa.biz.adbeverageacceptancedetail; |
|||
|
|||
import com.baomidou.mybatisplus.annotation.TableName; |
|||
import com.yxt.common.core.domain.BaseEntity; |
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
import java.math.BigDecimal; |
|||
|
|||
/** |
|||
* Project: yxt-oa(认定人员) <br/> |
|||
* File: AdExpatriatesDetail.java <br/> |
|||
* Class: com.yxt.anrui.oa.api.adexpatriatesdetail.AdExpatriatesDetail <br/> |
|||
* Description: 驻外人员认定列表. <br/> |
|||
* Copyright: Copyright (c) 2011 <br/> |
|||
* Company: https://gitee.com/liuzp315 <br/>
|
|||
* Makedate: 2025-01-20 15:35:08 <br/> |
|||
* |
|||
* @author liupopo |
|||
* @version 1.0 |
|||
* @since 1.0 |
|||
*/ |
|||
@Data |
|||
@ApiModel(value = "集团用酒领用申请列表", description = "集团用酒领用申请列表") |
|||
@TableName("ad_beverage_acceptance_detail") |
|||
public class AdBeverageAcceptanceDetail extends BaseEntity { |
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
@ApiModelProperty("申请sid") |
|||
private String mainSid; // 申请sid
|
|||
@ApiModelProperty("物品基础信息Sid") |
|||
private String goodsSpuSid; // 物品基础信息Sid
|
|||
@ApiModelProperty("商品名称") |
|||
private String goodsSpuName; // 商品名称
|
|||
@ApiModelProperty("物品Skusid") |
|||
private String goodsSkuSid; // 物品Skusid
|
|||
@ApiModelProperty("规格型号") |
|||
private String goodsSkuOwnSpec; // 规格型号
|
|||
@ApiModelProperty("计量单位") |
|||
private String unit; // 计量单位
|
|||
@ApiModelProperty("数量") |
|||
private BigDecimal count; // 库存数量
|
|||
@ApiModelProperty("库存sid") |
|||
private String inventorySid; // 库存sid
|
|||
@ApiModelProperty("单价") |
|||
private BigDecimal price; // 单价
|
|||
@ApiModelProperty("合计金额") |
|||
private BigDecimal priceTotal; // 合计金额
|
|||
|
|||
|
|||
} |
@ -0,0 +1,70 @@ |
|||
/********************************************************* |
|||
********************************************************* |
|||
******************** ******************* |
|||
************* ************ |
|||
******* _oo0oo_ ******* |
|||
*** o8888888o *** |
|||
* 88" . "88 * |
|||
* (| -_- |) * |
|||
* 0\ = /0 * |
|||
* ___/`---'\___ * |
|||
* .' \\| |// '. *
|
|||
* / \\||| : |||// \ *
|
|||
* / _||||| -:- |||||- \ * |
|||
* | | \\\ - /// | | *
|
|||
* | \_| ''\---/'' |_/ | * |
|||
* \ .-\__ '-' ___/-. / * |
|||
* ___'. .' /--.--\ `. .'___ * |
|||
* ."" '< `.___\_<|>_/___.' >' "". * |
|||
* | | : `- \`.;`\ _ /`;.`/ - ` : | | * |
|||
* \ \ `_. \_ __\ /__ _/ .-` / / * |
|||
* =====`-.____`.___ \_____/___.-`___.-'===== * |
|||
* `=---=' * |
|||
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * |
|||
*********__佛祖保佑__永无BUG__验收通过__钞票多多__********* |
|||
*********************************************************/ |
|||
package com.yxt.anrui.oa.biz.adbeverageacceptancedetail; |
|||
|
|||
|
|||
import com.yxt.anrui.oa.biz.oaform.FormCommon; |
|||
import com.yxt.common.core.dto.Dto; |
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* Project: yxt-oa(认定人员) <br/> |
|||
* File: AdExpatriatesDetailDto.java <br/> |
|||
* Class: com.yxt.anrui.oa.api.adexpatriatesdetail.AdExpatriatesDetailDto <br/> |
|||
* Description: 驻外人员认定列表 数据传输对象. <br/> |
|||
* Copyright: Copyright (c) 2011 <br/> |
|||
* Company: https://gitee.com/liuzp315 <br/>
|
|||
* Makedate: 2025-01-20 15:35:08 <br/> |
|||
* |
|||
* @author liupopo |
|||
* @version 1.0 |
|||
* @since 1.0 |
|||
*/ |
|||
@Data |
|||
@ApiModel(value = "驻外人员认定列表 数据传输对象", description = "驻外人员认定列表 数据传输对象") |
|||
public class AdBeverageAcceptanceDetailDto implements Dto { |
|||
|
|||
@ApiModelProperty("驻外人员") |
|||
private FormCommon expatriatesObj; |
|||
private String expatriatesKey; |
|||
private String expatriatesValue; |
|||
@ApiModelProperty("驻外人员部门") |
|||
private FormCommon deptObj; |
|||
private String deptKey; |
|||
private String deptValue; |
|||
@ApiModelProperty("驻外人员职位") |
|||
private FormCommon jobObj; |
|||
private String jobKey; |
|||
private String jobValue; |
|||
@ApiModelProperty("驻外人员家庭常住地址") |
|||
private String expatriatesHomeAddress; |
|||
@ApiModelProperty("驻外人员工作地址") |
|||
private String expatriatesWorkAddress; |
|||
@ApiModelProperty("驻外人员开始驻外时间") |
|||
private String expatriatesDate; |
|||
} |
@ -0,0 +1,66 @@ |
|||
/********************************************************* |
|||
********************************************************* |
|||
******************** ******************* |
|||
************* ************ |
|||
******* _oo0oo_ ******* |
|||
*** o8888888o *** |
|||
* 88" . "88 * |
|||
* (| -_- |) * |
|||
* 0\ = /0 * |
|||
* ___/`---'\___ * |
|||
* .' \\| |// '. *
|
|||
* / \\||| : |||// \ *
|
|||
* / _||||| -:- |||||- \ * |
|||
* | | \\\ - /// | | *
|
|||
* | \_| ''\---/'' |_/ | * |
|||
* \ .-\__ '-' ___/-. / * |
|||
* ___'. .' /--.--\ `. .'___ * |
|||
* ."" '< `.___\_<|>_/___.' >' "". * |
|||
* | | : `- \`.;`\ _ /`;.`/ - ` : | | * |
|||
* \ \ `_. \_ __\ /__ _/ .-` / / * |
|||
* =====`-.____`.___ \_____/___.-`___.-'===== * |
|||
* `=---=' * |
|||
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * |
|||
*********__佛祖保佑__永无BUG__验收通过__钞票多多__********* |
|||
*********************************************************/ |
|||
package com.yxt.anrui.oa.biz.adbeverageacceptancedetail; |
|||
|
|||
|
|||
import com.yxt.common.core.vo.Vo; |
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* Project: yxt-oa(认定人员) <br/> |
|||
* File: AdExpatriatesDetailVo.java <br/> |
|||
* Class: com.yxt.anrui.oa.api.adexpatriatesdetail.AdExpatriatesDetailVo <br/> |
|||
* Description: 驻外人员认定列表 视图数据对象. <br/> |
|||
* Copyright: Copyright (c) 2011 <br/> |
|||
* Company: https://gitee.com/liuzp315 <br/>
|
|||
* Makedate: 2025-01-20 15:35:08 <br/> |
|||
* |
|||
* @author liupopo |
|||
* @version 1.0 |
|||
* @since 1.0 |
|||
*/ |
|||
@Data |
|||
@ApiModel(value = "驻外人员认定列表 视图数据对象", description = "驻外人员认定列表 视图数据对象") |
|||
public class AdBeverageAcceptanceDetailListDetailVo implements Vo { |
|||
|
|||
private String sid; |
|||
|
|||
@ApiModelProperty("驻外人员") |
|||
private String expatriatesValue; |
|||
@ApiModelProperty("驻外人员部门") |
|||
private String deptValue; |
|||
@ApiModelProperty("驻外人员职位") |
|||
private String jobValue; |
|||
@ApiModelProperty("驻外人员家庭常住地址") |
|||
private String expatriatesHomeAddress; |
|||
@ApiModelProperty("驻外人员工作地址") |
|||
private String expatriatesWorkAddress; |
|||
@ApiModelProperty("驻外人员开始驻外时间") |
|||
private String expatriatesDate; |
|||
|
|||
} |
@ -0,0 +1,41 @@ |
|||
/********************************************************* |
|||
********************************************************* |
|||
******************** ******************* |
|||
************* ************ |
|||
******* _oo0oo_ ******* |
|||
*** o8888888o *** |
|||
* 88" . "88 * |
|||
* (| -_- |) * |
|||
* 0\ = /0 * |
|||
* ___/`---'\___ * |
|||
* .' \\| |// '. *
|
|||
* / \\||| : |||// \ *
|
|||
* / _||||| -:- |||||- \ * |
|||
* | | \\\ - /// | | *
|
|||
* | \_| ''\---/'' |_/ | * |
|||
* \ .-\__ '-' ___/-. / * |
|||
* ___'. .' /--.--\ `. .'___ * |
|||
* ."" '< `.___\_<|>_/___.' >' "". * |
|||
* | | : `- \`.;`\ _ /`;.`/ - ` : | | * |
|||
* \ \ `_. \_ __\ /__ _/ .-` / / * |
|||
* =====`-.____`.___ \_____/___.-`___.-'===== * |
|||
* `=---=' * |
|||
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * |
|||
*********__佛祖保佑__永无BUG__验收通过__钞票多多__********* |
|||
*********************************************************/ |
|||
package com.yxt.anrui.oa.biz.adbeverageacceptancedetail; |
|||
|
|||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
import org.apache.ibatis.annotations.Select; |
|||
|
|||
import java.util.List; |
|||
|
|||
@Mapper |
|||
public interface AdBeverageAcceptanceDetailMapper extends BaseMapper<AdBeverageAcceptanceDetail> { |
|||
|
|||
@Select("select * from ad_office_supplies_detail where mainSid = #{mainSid}") |
|||
List<AdBeverageAcceptanceDetail> selectByMainSid(String mainSid); |
|||
|
|||
List<AdBeverageAcceptanceDetailVo> getUpdateInit(String sid); |
|||
} |
@ -0,0 +1,9 @@ |
|||
<?xml version="1.0" encoding="UTF-8" ?> |
|||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|||
<mapper namespace="com.yxt.anrui.oa.biz.adofficesuppliesdetail.AdOfficeSuppliesDetailMapper"> |
|||
<select id="getUpdateInit" resultType="com.yxt.anrui.oa.biz.adofficesuppliesdetail.AdOfficeSuppliesDetailVo"> |
|||
select * |
|||
from ad_office_supplies_detail |
|||
where mainSid = #{sid} |
|||
</select> |
|||
</mapper> |
@ -0,0 +1,87 @@ |
|||
/********************************************************* |
|||
********************************************************* |
|||
******************** ******************* |
|||
************* ************ |
|||
******* _oo0oo_ ******* |
|||
*** o8888888o *** |
|||
* 88" . "88 * |
|||
* (| -_- |) * |
|||
* 0\ = /0 * |
|||
* ___/`---'\___ * |
|||
* .' \\| |// '. *
|
|||
* / \\||| : |||// \ *
|
|||
* / _||||| -:- |||||- \ * |
|||
* | | \\\ - /// | | *
|
|||
* | \_| ''\---/'' |_/ | * |
|||
* \ .-\__ '-' ___/-. / * |
|||
* ___'. .' /--.--\ `. .'___ * |
|||
* ."" '< `.___\_<|>_/___.' >' "". * |
|||
* | | : `- \`.;`\ _ /`;.`/ - ` : | | * |
|||
* \ \ `_. \_ __\ /__ _/ .-` / / * |
|||
* =====`-.____`.___ \_____/___.-`___.-'===== * |
|||
* `=---=' * |
|||
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * |
|||
*********__佛祖保佑__永无BUG__验收通过__钞票多多__********* |
|||
*********************************************************/ |
|||
package com.yxt.anrui.oa.biz.adbeverageacceptancedetail; |
|||
|
|||
import com.yxt.anrui.oa.biz.oaform.FormCommon; |
|||
import com.yxt.common.base.service.MybatisBaseService; |
|||
import org.apache.commons.lang3.StringUtils; |
|||
import org.springframework.stereotype.Service; |
|||
|
|||
import java.math.BigDecimal; |
|||
import java.util.Collections; |
|||
import java.util.List; |
|||
import java.util.Map; |
|||
|
|||
@Service |
|||
public class AdBeverageAcceptanceDetailService extends MybatisBaseService<AdBeverageAcceptanceDetailMapper, AdBeverageAcceptanceDetail> { |
|||
|
|||
public void saveDetails(List<FormCommon> list, String sid) { |
|||
//根据sid查询明细并删除
|
|||
List<AdBeverageAcceptanceDetail> list2 = baseMapper.selectByMainSid(sid); |
|||
list2.removeAll(Collections.singleton(null)); |
|||
if (!list2.isEmpty()) { |
|||
list2.stream().forEach(v -> { |
|||
deleteBySid(v.getSid()); |
|||
}); |
|||
} |
|||
list.removeAll(Collections.singleton(null)); |
|||
if (!list.isEmpty()) { |
|||
list.stream().forEach(f -> { |
|||
AdBeverageAcceptanceDetail detail = new AdBeverageAcceptanceDetail(); |
|||
detail.setMainSid(sid); |
|||
detail.setInventorySid(f.getId()); |
|||
detail.setGoodsSpuName(f.getDictValue()); |
|||
if (null != f.getExtra()) { |
|||
Map<String, Object> e = f.getExtra(); |
|||
for (Map.Entry <String,Object> entry : e.entrySet()) { |
|||
if (StringUtils.isNotBlank((String)entry.getValue())) { |
|||
if (entry.getKey().equals("count")) { |
|||
detail.setCount(new BigDecimal((String)entry.getValue())); |
|||
} |
|||
if (entry.getKey().equals("goodsSkuOwnSpec")) { |
|||
detail.setGoodsSkuOwnSpec((String)entry.getValue()); |
|||
} |
|||
if (entry.getKey().equals("goodsSkuSid")) { |
|||
detail.setGoodsSkuSid((String)entry.getValue()); |
|||
} |
|||
if (entry.getKey().equals("goodsSpuSid")) { |
|||
detail.setGoodsSpuSid((String)entry.getValue()); |
|||
} |
|||
if (entry.getKey().equals("unit")) { |
|||
detail.setUnit((String)entry.getValue()); |
|||
} |
|||
} |
|||
} |
|||
} |
|||
baseMapper.insert(detail); |
|||
}); |
|||
} |
|||
} |
|||
|
|||
public List<AdBeverageAcceptanceDetailVo> getUpdateInit(String sid) { |
|||
return baseMapper.getUpdateInit(sid); |
|||
} |
|||
} |
@ -0,0 +1,67 @@ |
|||
/********************************************************* |
|||
********************************************************* |
|||
******************** ******************* |
|||
************* ************ |
|||
******* _oo0oo_ ******* |
|||
*** o8888888o *** |
|||
* 88" . "88 * |
|||
* (| -_- |) * |
|||
* 0\ = /0 * |
|||
* ___/`---'\___ * |
|||
* .' \\| |// '. *
|
|||
* / \\||| : |||// \ *
|
|||
* / _||||| -:- |||||- \ * |
|||
* | | \\\ - /// | | *
|
|||
* | \_| ''\---/'' |_/ | * |
|||
* \ .-\__ '-' ___/-. / * |
|||
* ___'. .' /--.--\ `. .'___ * |
|||
* ."" '< `.___\_<|>_/___.' >' "". * |
|||
* | | : `- \`.;`\ _ /`;.`/ - ` : | | * |
|||
* \ \ `_. \_ __\ /__ _/ .-` / / * |
|||
* =====`-.____`.___ \_____/___.-`___.-'===== * |
|||
* `=---=' * |
|||
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * |
|||
*********__佛祖保佑__永无BUG__验收通过__钞票多多__********* |
|||
*********************************************************/ |
|||
package com.yxt.anrui.oa.biz.adbeverageacceptancedetail; |
|||
|
|||
|
|||
import com.yxt.common.core.vo.Vo; |
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* Project: yxt-oa(认定人员) <br/> |
|||
* File: AdExpatriatesDetailVo.java <br/> |
|||
* Class: com.yxt.anrui.oa.api.adexpatriatesdetail.AdExpatriatesDetailVo <br/> |
|||
* Description: 驻外人员认定列表 视图数据对象. <br/> |
|||
* Copyright: Copyright (c) 2011 <br/> |
|||
* Company: https://gitee.com/liuzp315 <br/>
|
|||
* Makedate: 2025-01-20 15:35:08 <br/> |
|||
* |
|||
* @author liupopo |
|||
* @version 1.0 |
|||
* @since 1.0 |
|||
*/ |
|||
@Data |
|||
@ApiModel(value = "驻外人员认定列表 视图数据对象", description = "驻外人员认定列表 视图数据对象") |
|||
public class AdBeverageAcceptanceDetailVo implements Vo { |
|||
|
|||
private String sid; |
|||
|
|||
@ApiModelProperty("物品基础信息Sid") |
|||
private String goodsSpuSid; // 物品基础信息Sid
|
|||
@ApiModelProperty("商品名称") |
|||
private String goodsSpuName; // 商品名称
|
|||
@ApiModelProperty("物品Skusid") |
|||
private String goodsSkuSid; // 物品Skusid
|
|||
@ApiModelProperty("规格型号") |
|||
private String goodsSkuOwnSpec; // 规格型号
|
|||
@ApiModelProperty("计量单位") |
|||
private String unit; // 计量单位
|
|||
@ApiModelProperty("库存数量") |
|||
private String count; // 库存数量
|
|||
@ApiModelProperty("库存sid") |
|||
private String inventorySid; // 库存sid
|
|||
} |
@ -0,0 +1,44 @@ |
|||
/********************************************************* |
|||
********************************************************* |
|||
******************** ******************* |
|||
************* ************ |
|||
******* _oo0oo_ ******* |
|||
*** o8888888o *** |
|||
* 88" . "88 * |
|||
* (| -_- |) * |
|||
* 0\ = /0 * |
|||
* ___/`---'\___ * |
|||
* .' \\| |// '. *
|
|||
* / \\||| : |||// \ *
|
|||
* / _||||| -:- |||||- \ * |
|||
* | | \\\ - /// | | *
|
|||
* | \_| ''\---/'' |_/ | * |
|||
* \ .-\__ '-' ___/-. / * |
|||
* ___'. .' /--.--\ `. .'___ * |
|||
* ."" '< `.___\_<|>_/___.' >' "". * |
|||
* | | : `- \`.;`\ _ /`;.`/ - ` : | | * |
|||
* \ \ `_. \_ __\ /__ _/ .-` / / * |
|||
* =====`-.____`.___ \_____/___.-`___.-'===== * |
|||
* `=---=' * |
|||
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * |
|||
*********__佛祖保佑__永无BUG__验收通过__钞票多多__********* |
|||
*********************************************************/ |
|||
package com.yxt.anrui.oa.biz.adofficesuppliesapply; |
|||
|
|||
import com.baomidou.mybatisplus.annotation.TableName; |
|||
import com.yxt.common.core.domain.BaseEntity; |
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
@Data |
|||
@ApiModel(value = "办公用品领用", description = "办公用品领用") |
|||
@TableName("ad_office_supplies_apply") |
|||
public class AdOfficeSuppliesApply extends BaseEntity { |
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
@ApiModelProperty("基础表单sid") |
|||
private String formSid; // 基础表单sid
|
|||
|
|||
|
|||
} |
@ -0,0 +1,23 @@ |
|||
package com.yxt.anrui.oa.biz.adofficesuppliesapply; |
|||
|
|||
import com.yxt.anrui.oa.biz.oaform.FormCommon; |
|||
import com.yxt.anrui.oa.biz.oaform.OaFormCommonVo; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
import java.util.ArrayList; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @description: |
|||
* @author: dimengzhe |
|||
* @date: 2025/1/21 |
|||
**/ |
|||
@Data |
|||
public class AdOfficeSuppliesApplyDetailVo extends OaFormCommonVo { |
|||
|
|||
@ApiModelProperty("备注") |
|||
private String remarks; |
|||
|
|||
private List<FormCommon> list = new ArrayList<>(); |
|||
} |
@ -0,0 +1,59 @@ |
|||
/********************************************************* |
|||
********************************************************* |
|||
******************** ******************* |
|||
************* ************ |
|||
******* _oo0oo_ ******* |
|||
*** o8888888o *** |
|||
* 88" . "88 * |
|||
* (| -_- |) * |
|||
* 0\ = /0 * |
|||
* ___/`---'\___ * |
|||
* .' \\| |// '. *
|
|||
* / \\||| : |||// \ *
|
|||
* / _||||| -:- |||||- \ * |
|||
* | | \\\ - /// | | *
|
|||
* | \_| ''\---/'' |_/ | * |
|||
* \ .-\__ '-' ___/-. / * |
|||
* ___'. .' /--.--\ `. .'___ * |
|||
* ."" '< `.___\_<|>_/___.' >' "". * |
|||
* | | : `- \`.;`\ _ /`;.`/ - ` : | | * |
|||
* \ \ `_. \_ __\ /__ _/ .-` / / * |
|||
* =====`-.____`.___ \_____/___.-`___.-'===== * |
|||
* `=---=' * |
|||
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * |
|||
*********__佛祖保佑__永无BUG__验收通过__钞票多多__********* |
|||
*********************************************************/ |
|||
package com.yxt.anrui.oa.biz.adofficesuppliesapply; |
|||
|
|||
|
|||
import com.yxt.anrui.oa.biz.oaform.FormCommon; |
|||
import com.yxt.anrui.oa.biz.oaform.OaFormDto; |
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
import java.util.ArrayList; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* Project: oa(驻外人员认定申请) <br/> |
|||
* File: AdExpatriatesApplyDto.java <br/> |
|||
* Class: com.yxt.anrui.oa.api.adexpatriatesapply.AdExpatriatesApplyDto <br/> |
|||
* Description: 驻外人员认定申请 数据传输对象. <br/> |
|||
* Copyright: Copyright (c) 2011 <br/> |
|||
* Company: https://gitee.com/liuzp315 <br/>
|
|||
* Makedate: 2025-01-16 15:22:53 <br/> |
|||
* |
|||
* @author liupopo |
|||
* @version 1.0 |
|||
* @since 1.0 |
|||
*/ |
|||
@Data |
|||
@ApiModel(value = "驻外人员认定申请 数据传输对象", description = "驻外人员认定申请 数据传输对象") |
|||
public class AdOfficeSuppliesApplyDto extends OaFormDto { |
|||
|
|||
@ApiModelProperty("备注") |
|||
private String remarks; |
|||
|
|||
private List<FormCommon> list = new ArrayList<>(); |
|||
} |
@ -0,0 +1,37 @@ |
|||
/********************************************************* |
|||
********************************************************* |
|||
******************** ******************* |
|||
************* ************ |
|||
******* _oo0oo_ ******* |
|||
*** o8888888o *** |
|||
* 88" . "88 * |
|||
* (| -_- |) * |
|||
* 0\ = /0 * |
|||
* ___/`---'\___ * |
|||
* .' \\| |// '. *
|
|||
* / \\||| : |||// \ *
|
|||
* / _||||| -:- |||||- \ * |
|||
* | | \\\ - /// | | *
|
|||
* | \_| ''\---/'' |_/ | * |
|||
* \ .-\__ '-' ___/-. / * |
|||
* ___'. .' /--.--\ `. .'___ * |
|||
* ."" '< `.___\_<|>_/___.' >' "". * |
|||
* | | : `- \`.;`\ _ /`;.`/ - ` : | | * |
|||
* \ \ `_. \_ __\ /__ _/ .-` / / * |
|||
* =====`-.____`.___ \_____/___.-`___.-'===== * |
|||
* `=---=' * |
|||
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * |
|||
*********__佛祖保佑__永无BUG__验收通过__钞票多多__********* |
|||
*********************************************************/ |
|||
package com.yxt.anrui.oa.biz.adofficesuppliesapply; |
|||
|
|||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
|
|||
@Mapper |
|||
public interface AdOfficeSuppliesApplyMapper extends BaseMapper<AdOfficeSuppliesApply> { |
|||
|
|||
int selectBySid(String join); |
|||
|
|||
AdOfficeSuppliesApplyDetailVo details(String sid); |
|||
} |
@ -0,0 +1,39 @@ |
|||
<?xml version="1.0" encoding="UTF-8" ?> |
|||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|||
<mapper namespace="com.yxt.anrui.oa.biz.adofficesuppliesapply.AdOfficeSuppliesApplyMapper"> |
|||
<!-- <where> ${ew.sqlSegment} </where>--> |
|||
<!-- ${ew.customSqlSegment} --> |
|||
|
|||
<select id="selectBySid" resultType="int"> |
|||
SELECT COUNT(*) |
|||
FROM ad_office_supplies_apply ae |
|||
left join oa_form ofm on ae.formSid = ofm.sid |
|||
WHERE ofm.nodeState != '待提交' |
|||
and find_in_set(oa.sid, #{list}) |
|||
</select> |
|||
|
|||
<select id="details" resultMap="detailMap"> |
|||
select remarks, sid |
|||
from ad_office_supplies_apply |
|||
where sid = #{sid} |
|||
</select> |
|||
|
|||
<resultMap id="detailMap" type="com.yxt.anrui.oa.biz.adexpatriatesapply.AdExpatriatesApplyDetailVo"> |
|||
<result column="remarks" property="remarks"/> |
|||
<collection property="list" ofType="com.yxt.anrui.oa.biz.adexpatriatesdetail.AdExpatriatesListDetailVo" |
|||
select="selectList" column="sid"> |
|||
</collection> |
|||
</resultMap> |
|||
|
|||
<select id="selectList" resultType="com.yxt.anrui.oa.biz.adexpatriatesdetail.AdExpatriatesListDetailVo"> |
|||
select sid, |
|||
expatriatesName expatriatesValue, |
|||
expatriatesDeptName deptValue, |
|||
expatriatesPostName jobValue, |
|||
expatriatesHomeAddress, |
|||
expatriatesWorkAddress, |
|||
expatriatesDate |
|||
from ad_expatriates_detail |
|||
where mainSid = #{sid} |
|||
</select> |
|||
</mapper> |
@ -0,0 +1,343 @@ |
|||
/********************************************************* |
|||
********************************************************* |
|||
******************** ******************* |
|||
************* ************ |
|||
******* _oo0oo_ ******* |
|||
*** o8888888o *** |
|||
* 88" . "88 * |
|||
* (| -_- |) * |
|||
* 0\ = /0 * |
|||
* ___/`---'\___ * |
|||
* .' \\| |// '. *
|
|||
* / \\||| : |||// \ *
|
|||
* / _||||| -:- |||||- \ * |
|||
* | | \\\ - /// | | *
|
|||
* | \_| ''\---/'' |_/ | * |
|||
* \ .-\__ '-' ___/-. / * |
|||
* ___'. .' /--.--\ `. .'___ * |
|||
* ."" '< `.___\_<|>_/___.' >' "". * |
|||
* | | : `- \`.;`\ _ /`;.`/ - ` : | | * |
|||
* \ \ `_. \_ __\ /__ _/ .-` / / * |
|||
* =====`-.____`.___ \_____/___.-`___.-'===== * |
|||
* `=---=' * |
|||
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * |
|||
*********__佛祖保佑__永无BUG__验收通过__钞票多多__********* |
|||
*********************************************************/ |
|||
package com.yxt.anrui.oa.biz.adofficesuppliesapply; |
|||
|
|||
import cn.hutool.core.bean.BeanUtil; |
|||
import com.yxt.anrui.oa.biz.adofficesuppliesdetail.AdOfficeSuppliesDetailService; |
|||
import com.yxt.anrui.oa.biz.adofficesuppliesdetail.AdOfficeSuppliesDetailVo; |
|||
import com.yxt.anrui.oa.biz.oaappendix.OaAppendixService; |
|||
import com.yxt.anrui.oa.biz.oaform.*; |
|||
import com.yxt.anrui.oa.biz.oaform.flowable.*; |
|||
import com.yxt.anrui.oa.feign.flowable.flow.ProcDefEnum; |
|||
import com.yxt.anrui.oa.feign.portal.sysorganization.SysOrganizationFeign; |
|||
import com.yxt.anrui.oa.feign.portal.sysorganization.SysOrganizationVo; |
|||
import com.yxt.common.base.service.MybatisBaseService; |
|||
import com.yxt.common.core.result.ResultBean; |
|||
import org.apache.commons.lang3.StringUtils; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Service; |
|||
|
|||
import java.util.*; |
|||
|
|||
@Service |
|||
public class AdOfficeSuppliesApplyService extends MybatisBaseService<AdOfficeSuppliesApplyMapper, AdOfficeSuppliesApply> { |
|||
|
|||
@Autowired |
|||
private OaAppendixService oaAppendixService; |
|||
@Autowired |
|||
private OaFormService oaFormService; |
|||
@Autowired |
|||
private AdOfficeSuppliesDetailService adOfficeSuppliesDetailService; |
|||
@Autowired |
|||
private SysOrganizationFeign sysOrganizationFeign; |
|||
|
|||
public ResultBean<AdOfficeSuppliesApplyVo> getSaveInit(String userSid, String orgPath) { |
|||
ResultBean<AdOfficeSuppliesApplyVo> rb = ResultBean.fireFail(); |
|||
AdOfficeSuppliesApplyVo adOfficeSuppliesApplyVo = new AdOfficeSuppliesApplyVo(); |
|||
adOfficeSuppliesApplyVo.setCreateBySid(userSid); |
|||
adOfficeSuppliesApplyVo.setOrgSidPath(orgPath); |
|||
return rb.success().setData(adOfficeSuppliesApplyVo); |
|||
} |
|||
|
|||
public ResultBean<AdOfficeSuppliesApplyVo> getUpdateInit(String sid) { |
|||
ResultBean<AdOfficeSuppliesApplyVo> rb = ResultBean.fireFail(); |
|||
AdOfficeSuppliesApplyVo adOfficeSuppliesApplyVo = new AdOfficeSuppliesApplyVo(); |
|||
AdOfficeSuppliesApply adOfficeSuppliesApply = fetchBySid(sid); |
|||
if (adOfficeSuppliesApply == null) { |
|||
return rb.setMsg("该申请不存在"); |
|||
} |
|||
OaForm oaForm = oaFormService.fetchBySid(sid); |
|||
adOfficeSuppliesApplyVo.setTaskId(oaForm.getTaskId()); |
|||
adOfficeSuppliesApplyVo.setProcInsId(oaForm.getProcInstId()); |
|||
//根据部门sid获取orgPath并赋值
|
|||
SysOrganizationVo organizationVo = sysOrganizationFeign.fetchBySid(oaForm.getDeptSid()).getData(); |
|||
String orgSidPath = organizationVo.getOrgSidPath(); |
|||
adOfficeSuppliesApplyVo.setOrgSidPath(orgSidPath); |
|||
adOfficeSuppliesApplyVo.setCreateBySid(oaForm.getCreateBySid()); |
|||
BeanUtil.copyProperties(adOfficeSuppliesApply, adOfficeSuppliesApplyVo); |
|||
List<AdOfficeSuppliesDetailVo> list = adOfficeSuppliesDetailService.getUpdateInit(sid); |
|||
list.removeAll(Collections.singleton(null)); |
|||
List<FormCommon> officeObj = new ArrayList<>(); |
|||
if (!list.isEmpty()) { |
|||
for (AdOfficeSuppliesDetailVo d : list) { |
|||
FormCommon formCommon = new FormCommon(); |
|||
Map<String, Object> extra = new HashMap<>(); |
|||
formCommon.setId(d.getInventorySid()); |
|||
formCommon.setDictValue(d.getGoodsSpuName()); |
|||
if (StringUtils.isNotBlank(d.getCount())) { |
|||
extra.put("count",d.getCount()); |
|||
} |
|||
if (StringUtils.isNotBlank(d.getGoodsSkuOwnSpec())) { |
|||
extra.put("goodsSkuOwnSpec",d.getGoodsSkuOwnSpec()); |
|||
} |
|||
if (StringUtils.isNotBlank(d.getGoodsSkuSid())) { |
|||
extra.put("goodsSkuSid",d.getGoodsSkuSid()); |
|||
} |
|||
if (StringUtils.isNotBlank(d.getGoodsSpuSid())) { |
|||
extra.put("goodsSpuSid",d.getGoodsSpuSid()); |
|||
} |
|||
if (StringUtils.isNotBlank(d.getUnit())) { |
|||
extra.put("unit",d.getUnit()); |
|||
} |
|||
formCommon.setExtra(extra); |
|||
officeObj.add(formCommon); |
|||
} |
|||
} |
|||
adOfficeSuppliesApplyVo.setList(officeObj); |
|||
adOfficeSuppliesApplyVo.setSid(sid); |
|||
return rb.success().setData(adOfficeSuppliesApplyVo); |
|||
} |
|||
|
|||
public ResultBean<String> saveOrUpdateDto(AdOfficeSuppliesApplyDto dto) { |
|||
ResultBean<String> rb = ResultBean.fireFail(); |
|||
String sid = dto.getSid(); |
|||
List<FormCommon> list = dto.getList(); |
|||
if (StringUtils.isBlank(sid)) { |
|||
// 新建操作
|
|||
AdOfficeSuppliesApply entity = new AdOfficeSuppliesApply(); |
|||
BeanUtil.copyProperties(dto, entity, "sid"); |
|||
|
|||
dto.setBillNo("BGYPLY"); |
|||
dto.setSid(entity.getSid()); |
|||
ResultBean<String> resultBean = oaFormService.saveOaForm(dto); |
|||
|
|||
if (!resultBean.getSuccess()) { |
|||
return rb; |
|||
} |
|||
|
|||
entity.setFormSid(resultBean.getData()); |
|||
baseMapper.insert(entity); |
|||
sid = entity.getSid(); |
|||
} else { |
|||
// 更新操作
|
|||
AdOfficeSuppliesApply entity = fetchBySid(sid); |
|||
BeanUtil.copyProperties(dto, entity, "id", "sid"); |
|||
baseMapper.updateById(entity); |
|||
} |
|||
adOfficeSuppliesDetailService.saveDetails(list, sid); |
|||
return rb.success().setData(sid); |
|||
} |
|||
|
|||
|
|||
public ResultBean delAll(String[] sids) { |
|||
ResultBean rb = ResultBean.fireFail(); |
|||
//查询该sid中是否有流程不是待提交的
|
|||
int count = baseMapper.selectBySid(StringUtils.join(sids, ",")); |
|||
if (count > 0) { |
|||
return rb.setMsg("删除的数据中包含已提交或已办结审批的数据,删除失败"); |
|||
} |
|||
delBySids(sids); |
|||
return rb.success(); |
|||
} |
|||
|
|||
public ResultBean<AdOfficeSuppliesApplyDetailVo> details(String sid, String application) { |
|||
ResultBean<AdOfficeSuppliesApplyDetailVo> rb = ResultBean.fireFail(); |
|||
AdOfficeSuppliesApplyDetailVo adOfficeSuppliesApplyDetailVo = baseMapper.details(sid); |
|||
if (adOfficeSuppliesApplyDetailVo == null) { |
|||
return rb.setMsg("该申请不存在"); |
|||
} |
|||
//基础字段赋值
|
|||
BeanUtil.copyProperties(oaFormService.getDetails(sid), adOfficeSuppliesApplyDetailVo); |
|||
List<FormCommon> obj = new ArrayList<>(); |
|||
List<AdOfficeSuppliesDetailVo> detailVos = adOfficeSuppliesDetailService.getUpdateInit(sid); |
|||
if (!detailVos.isEmpty()) { |
|||
for (AdOfficeSuppliesDetailVo d : detailVos) { |
|||
FormCommon formCommon = new FormCommon(); |
|||
Map<String, Object> extra = new HashMap<>(); |
|||
formCommon.setId(d.getInventorySid()); |
|||
formCommon.setDictValue(d.getGoodsSpuName()); |
|||
if (StringUtils.isNotBlank(d.getCount())) { |
|||
extra.put("count",d.getCount()); |
|||
} |
|||
if (StringUtils.isNotBlank(d.getGoodsSkuOwnSpec())) { |
|||
extra.put("goodsSkuOwnSpec",d.getGoodsSkuOwnSpec()); |
|||
} |
|||
if (StringUtils.isNotBlank(d.getGoodsSkuSid())) { |
|||
extra.put("goodsSkuSid",d.getGoodsSkuSid()); |
|||
} |
|||
if (StringUtils.isNotBlank(d.getGoodsSpuSid())) { |
|||
extra.put("goodsSpuSid",d.getGoodsSpuSid()); |
|||
} |
|||
if (StringUtils.isNotBlank(d.getUnit())) { |
|||
extra.put("unit",d.getUnit()); |
|||
} |
|||
formCommon.setExtra(extra); |
|||
obj.add(formCommon); |
|||
} |
|||
} |
|||
adOfficeSuppliesApplyDetailVo.setList(obj); |
|||
return rb.success().setData(adOfficeSuppliesApplyDetailVo); |
|||
} |
|||
|
|||
/** |
|||
* 提交 |
|||
* |
|||
* @param dto |
|||
* @return |
|||
*/ |
|||
public ResultBean submit(AdOfficeSuppliesApplyDto dto) { |
|||
ResultBean rb = ResultBean.fireFail(); |
|||
ResultBean<String> stringResultBean = saveOrUpdateDto(dto); |
|||
if (!stringResultBean.getSuccess()) { |
|||
return rb.setMsg(stringResultBean.getData()); |
|||
} |
|||
String businessSid = stringResultBean.getData(); |
|||
|
|||
SubmitDto submitDto = new SubmitDto(); |
|||
submitDto.setUserSid(dto.getCreateBySid()); |
|||
submitDto.setBusinessSid(businessSid); |
|||
|
|||
Map<String, Object> formVariables = new HashMap<>(); |
|||
formVariables = getMap(formVariables, businessSid); |
|||
submitDto.setFormVariables(formVariables); |
|||
submitDto.setProcDefId(ProcDefEnum.BGYPLYAPPLY.getProDefId()); |
|||
submitDto.setNextTaskId(dto.getTaskId()); |
|||
submitDto.setRule(OaFormRuleEnum.DIRECTLY_UNDER.getRule()); |
|||
return oaFormService.submit(submitDto); |
|||
} |
|||
|
|||
/** |
|||
* 办理(同意) |
|||
* |
|||
* @param dto |
|||
* @return |
|||
*/ |
|||
public ResultBean complete(CompleteDto dto) { |
|||
Map<String, Object> formVariables = dto.getFormVariables(); |
|||
formVariables = getMap(formVariables, dto.getBusinessSid()); |
|||
dto.setFormVariables(formVariables); |
|||
BusinessVariablesDto businessVariablesDto = new BusinessVariablesDto(); |
|||
BeanUtil.copyProperties(dto, businessVariablesDto); |
|||
return oaFormService.complete(businessVariablesDto); |
|||
} |
|||
|
|||
/** |
|||
* 驳回 |
|||
* |
|||
* @param dto |
|||
* @return |
|||
*/ |
|||
public ResultBean reject(TaskDto dto) { |
|||
Map<String, Object> formVariables = dto.getFormVariables(); |
|||
formVariables = getMap(formVariables, dto.getBusinessSid()); |
|||
dto.setFormVariables(formVariables); |
|||
return oaFormService.reject(dto); |
|||
} |
|||
|
|||
public ResultBean<String> getFlowOperateTitle(NodeQuery query) { |
|||
// 默认失败返回
|
|||
ResultBean<String> rb = ResultBean.fireFail(); |
|||
|
|||
// 获取next值和formVariables
|
|||
int next = query.getNext(); |
|||
|
|||
// 获取并更新formVariables
|
|||
Map<String, Object> formVariables = getMap(query.getFormVariables(), query.getBusinessSid()); |
|||
query.setFormVariables(formVariables); |
|||
|
|||
// 校验next参数是否有效(只允许0或1)
|
|||
if (next != 0 && next != 1) { |
|||
return rb.setMsg("参数错误:next"); // 如果next不是0或1,返回错误信息
|
|||
} |
|||
|
|||
// 获取节点名称
|
|||
String data = getNodeName(query, next); |
|||
|
|||
// 如果data为null,表示未获取到有效的节点信息
|
|||
if (data == null) { |
|||
return rb.setMsg("没有获取到节点信息"); // 返回错误消息
|
|||
} |
|||
|
|||
// 返回成功的结果和获取到的节点名称
|
|||
return rb.success().setData(data); |
|||
} |
|||
|
|||
/** |
|||
* 网关参数组成 |
|||
* |
|||
* @param formVariables |
|||
* @param sid |
|||
* @return |
|||
*/ |
|||
public Map<String, Object> getMap(Map<String, Object> formVariables, String sid) { |
|||
Map<String, Object> appMap = new HashMap<>(); |
|||
appMap.put("sid", sid); |
|||
/*appMap.put("editUrl", "approval/#/pages/EditOnboradingApplyActivity?sid=" + sid); |
|||
appMap.put("detailUrl", "approval/#/pages/DetailOnboradingApplyActivity?sid=" + sid); |
|||
appMap.put("flowOperateUrl", "oa/v1/HrHireApply/getFlowOperateTitle"); |
|||
appMap.put("agreeUrl", "oa/v1/HrHireApply/complete"); |
|||
appMap.put("stopUrl", "oa/v1/oaform/breakProcess"); |
|||
appMap.put("rejectUrl", "oa/v1/HrHireApply/reject"); |
|||
appMap.put("recallUrl", "oa/v1/oaform/revokeProcess"); |
|||
appMap.put("signUrl", "oa/v1/oaform/delegate"); |
|||
appMap.put("transferUrl", "oa/v1/oaform/assignTask");*/ |
|||
appMap.put(OaFormUrlEnum.HRHIREAPPLY_EDIT.getType(), OaFormUrlEnum.HRHIREAPPLY_EDIT.getUrl() + "?sid=" + sid); |
|||
appMap.put(OaFormUrlEnum.HRHIREAPPLY_DETAIL.getType(), OaFormUrlEnum.HRHIREAPPLY_DETAIL.getUrl() + "?sid=" + sid); |
|||
appMap.put(OaFormUrlEnum.HRHIREAPPLY_FLOWOPERATEURL.getType(), OaFormUrlEnum.HRHIREAPPLY_FLOWOPERATEURL.getUrl()); |
|||
appMap.put(OaFormUrlEnum.HRHIREAPPLY_AGREEURL.getType(), OaFormUrlEnum.HRHIREAPPLY_AGREEURL.getUrl()); |
|||
appMap.put(OaFormUrlEnum.STOPURL.getType(), OaFormUrlEnum.STOPURL.getUrl()); |
|||
appMap.put(OaFormUrlEnum.HRHIREAPPLY_REJECTURL.getType(), OaFormUrlEnum.HRHIREAPPLY_REJECTURL.getUrl()); |
|||
appMap.put(OaFormUrlEnum.RECALLURL.getType(), OaFormUrlEnum.RECALLURL.getUrl()); |
|||
appMap.put(OaFormUrlEnum.SIGNURL.getType(), OaFormUrlEnum.SIGNURL.getUrl()); |
|||
appMap.put(OaFormUrlEnum.TRANSFERURL.getType(), OaFormUrlEnum.TRANSFERURL.getUrl()); |
|||
formVariables.put("app", appMap); |
|||
//根据组织查询是否是分公司
|
|||
OaForm oaForm = oaFormService.fetchBySid(sid); |
|||
AdOfficeSuppliesApply adOfficeSuppliesApply = fetchBySid(sid); |
|||
SysOrganizationVo sysOrganization = sysOrganizationFeign.fetchBySid(oaForm.getUseOrgSid()).getData(); |
|||
//是否是分公司
|
|||
formVariables.put("isTrue", sysOrganization.getIsDept() == 0); |
|||
return formVariables; |
|||
} |
|||
|
|||
/** |
|||
* 根据next的值获取前一个节点或下一个节点的名称。 |
|||
* |
|||
* @param query 包含查询所需参数的NodeQuery对象 |
|||
* @param next 参数,0表示上一环节,1表示下一环节 |
|||
* @return 节点名称,如果失败则返回null |
|||
*/ |
|||
private String getNodeName(NodeQuery query, int next) { |
|||
// 根据next值选择相应的服务方法获取节点信息
|
|||
ResultBean<List<NodeVo>> resultBean = (next == 0) |
|||
? oaFormService.getPreviousNodesForReject(query) // 获取上一环节的节点
|
|||
: oaFormService.getNextNodesForSubmit(query); // 获取下一环节的节点
|
|||
// 如果服务调用成功
|
|||
if (resultBean.getSuccess()) { |
|||
// 清除结果列表中的null值,避免空节点
|
|||
resultBean.getData().removeAll(Collections.singleton(null)); |
|||
// 如果结果列表非空,返回第一个节点的名称
|
|||
if (!resultBean.getData().isEmpty()) { |
|||
return resultBean.getData().get(0).getName(); |
|||
} |
|||
} else { |
|||
// 如果服务调用失败,返回null
|
|||
return null; |
|||
} |
|||
// 如果结果为空,返回null
|
|||
return null; |
|||
} |
|||
} |
@ -0,0 +1,53 @@ |
|||
/********************************************************* |
|||
********************************************************* |
|||
******************** ******************* |
|||
************* ************ |
|||
******* _oo0oo_ ******* |
|||
*** o8888888o *** |
|||
* 88" . "88 * |
|||
* (| -_- |) * |
|||
* 0\ = /0 * |
|||
* ___/`---'\___ * |
|||
* .' \\| |// '. *
|
|||
* / \\||| : |||// \ *
|
|||
* / _||||| -:- |||||- \ * |
|||
* | | \\\ - /// | | *
|
|||
* | \_| ''\---/'' |_/ | * |
|||
* \ .-\__ '-' ___/-. / * |
|||
* ___'. .' /--.--\ `. .'___ * |
|||
* ."" '< `.___\_<|>_/___.' >' "". * |
|||
* | | : `- \`.;`\ _ /`;.`/ - ` : | | * |
|||
* \ \ `_. \_ __\ /__ _/ .-` / / * |
|||
* =====`-.____`.___ \_____/___.-`___.-'===== * |
|||
* `=---=' * |
|||
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * |
|||
*********__佛祖保佑__永无BUG__验收通过__钞票多多__********* |
|||
*********************************************************/ |
|||
package com.yxt.anrui.oa.biz.adofficesuppliesapply; |
|||
|
|||
import com.yxt.anrui.oa.biz.oaform.FormCommon; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
import java.util.ArrayList; |
|||
import java.util.List; |
|||
|
|||
@Data |
|||
public class AdOfficeSuppliesApplyVo { |
|||
|
|||
private String sid; |
|||
/* private String userSid; |
|||
private String orgPath;*/ |
|||
private String orgSidPath; |
|||
private String createBySid; |
|||
|
|||
@ApiModelProperty("备注") |
|||
private String remarks; |
|||
private List<FormCommon> list = new ArrayList<>(); |
|||
|
|||
private String taskId; |
|||
@ApiModelProperty("流程实例id") |
|||
private String procInsId; |
|||
|
|||
// private String testPage;
|
|||
} |
@ -0,0 +1,73 @@ |
|||
/********************************************************* |
|||
********************************************************* |
|||
******************** ******************* |
|||
************* ************ |
|||
******* _oo0oo_ ******* |
|||
*** o8888888o *** |
|||
* 88" . "88 * |
|||
* (| -_- |) * |
|||
* 0\ = /0 * |
|||
* ___/`---'\___ * |
|||
* .' \\| |// '. *
|
|||
* / \\||| : |||// \ *
|
|||
* / _||||| -:- |||||- \ * |
|||
* | | \\\ - /// | | *
|
|||
* | \_| ''\---/'' |_/ | * |
|||
* \ .-\__ '-' ___/-. / * |
|||
* ___'. .' /--.--\ `. .'___ * |
|||
* ."" '< `.___\_<|>_/___.' >' "". * |
|||
* | | : `- \`.;`\ _ /`;.`/ - ` : | | * |
|||
* \ \ `_. \_ __\ /__ _/ .-` / / * |
|||
* =====`-.____`.___ \_____/___.-`___.-'===== * |
|||
* `=---=' * |
|||
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * |
|||
*********__佛祖保佑__永无BUG__验收通过__钞票多多__********* |
|||
*********************************************************/ |
|||
package com.yxt.anrui.oa.biz.adofficesuppliesdetail; |
|||
|
|||
import com.baomidou.mybatisplus.annotation.TableName; |
|||
import com.yxt.common.core.domain.BaseEntity; |
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
import java.math.BigDecimal; |
|||
|
|||
/** |
|||
* Project: yxt-oa(认定人员) <br/> |
|||
* File: AdExpatriatesDetail.java <br/> |
|||
* Class: com.yxt.anrui.oa.api.adexpatriatesdetail.AdExpatriatesDetail <br/> |
|||
* Description: 驻外人员认定列表. <br/> |
|||
* Copyright: Copyright (c) 2011 <br/> |
|||
* Company: https://gitee.com/liuzp315 <br/>
|
|||
* Makedate: 2025-01-20 15:35:08 <br/> |
|||
* |
|||
* @author liupopo |
|||
* @version 1.0 |
|||
* @since 1.0 |
|||
*/ |
|||
@Data |
|||
@ApiModel(value = "办公用品领用列表", description = "办公用品领用列表") |
|||
@TableName("ad_office_supplies_detail") |
|||
public class AdOfficeSuppliesDetail extends BaseEntity { |
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
@ApiModelProperty("申请sid") |
|||
private String mainSid; // 申请sid
|
|||
@ApiModelProperty("物品基础信息Sid") |
|||
private String goodsSpuSid; // 物品基础信息Sid
|
|||
@ApiModelProperty("商品名称") |
|||
private String goodsSpuName; // 商品名称
|
|||
@ApiModelProperty("物品Skusid") |
|||
private String goodsSkuSid; // 物品Skusid
|
|||
@ApiModelProperty("规格型号") |
|||
private String goodsSkuOwnSpec; // 规格型号
|
|||
@ApiModelProperty("计量单位") |
|||
private String unit; // 计量单位
|
|||
@ApiModelProperty("数量") |
|||
private BigDecimal count; // 库存数量
|
|||
@ApiModelProperty("库存sid") |
|||
private String inventorySid; // 库存sid
|
|||
|
|||
|
|||
} |
@ -0,0 +1,70 @@ |
|||
/********************************************************* |
|||
********************************************************* |
|||
******************** ******************* |
|||
************* ************ |
|||
******* _oo0oo_ ******* |
|||
*** o8888888o *** |
|||
* 88" . "88 * |
|||
* (| -_- |) * |
|||
* 0\ = /0 * |
|||
* ___/`---'\___ * |
|||
* .' \\| |// '. *
|
|||
* / \\||| : |||// \ *
|
|||
* / _||||| -:- |||||- \ * |
|||
* | | \\\ - /// | | *
|
|||
* | \_| ''\---/'' |_/ | * |
|||
* \ .-\__ '-' ___/-. / * |
|||
* ___'. .' /--.--\ `. .'___ * |
|||
* ."" '< `.___\_<|>_/___.' >' "". * |
|||
* | | : `- \`.;`\ _ /`;.`/ - ` : | | * |
|||
* \ \ `_. \_ __\ /__ _/ .-` / / * |
|||
* =====`-.____`.___ \_____/___.-`___.-'===== * |
|||
* `=---=' * |
|||
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * |
|||
*********__佛祖保佑__永无BUG__验收通过__钞票多多__********* |
|||
*********************************************************/ |
|||
package com.yxt.anrui.oa.biz.adofficesuppliesdetail; |
|||
|
|||
|
|||
import com.yxt.anrui.oa.biz.oaform.FormCommon; |
|||
import com.yxt.common.core.dto.Dto; |
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* Project: yxt-oa(认定人员) <br/> |
|||
* File: AdExpatriatesDetailDto.java <br/> |
|||
* Class: com.yxt.anrui.oa.api.adexpatriatesdetail.AdExpatriatesDetailDto <br/> |
|||
* Description: 驻外人员认定列表 数据传输对象. <br/> |
|||
* Copyright: Copyright (c) 2011 <br/> |
|||
* Company: https://gitee.com/liuzp315 <br/>
|
|||
* Makedate: 2025-01-20 15:35:08 <br/> |
|||
* |
|||
* @author liupopo |
|||
* @version 1.0 |
|||
* @since 1.0 |
|||
*/ |
|||
@Data |
|||
@ApiModel(value = "驻外人员认定列表 数据传输对象", description = "驻外人员认定列表 数据传输对象") |
|||
public class AdOfficeSuppliesDetailDto implements Dto { |
|||
|
|||
@ApiModelProperty("驻外人员") |
|||
private FormCommon expatriatesObj; |
|||
private String expatriatesKey; |
|||
private String expatriatesValue; |
|||
@ApiModelProperty("驻外人员部门") |
|||
private FormCommon deptObj; |
|||
private String deptKey; |
|||
private String deptValue; |
|||
@ApiModelProperty("驻外人员职位") |
|||
private FormCommon jobObj; |
|||
private String jobKey; |
|||
private String jobValue; |
|||
@ApiModelProperty("驻外人员家庭常住地址") |
|||
private String expatriatesHomeAddress; |
|||
@ApiModelProperty("驻外人员工作地址") |
|||
private String expatriatesWorkAddress; |
|||
@ApiModelProperty("驻外人员开始驻外时间") |
|||
private String expatriatesDate; |
|||
} |
@ -0,0 +1,41 @@ |
|||
/********************************************************* |
|||
********************************************************* |
|||
******************** ******************* |
|||
************* ************ |
|||
******* _oo0oo_ ******* |
|||
*** o8888888o *** |
|||
* 88" . "88 * |
|||
* (| -_- |) * |
|||
* 0\ = /0 * |
|||
* ___/`---'\___ * |
|||
* .' \\| |// '. *
|
|||
* / \\||| : |||// \ *
|
|||
* / _||||| -:- |||||- \ * |
|||
* | | \\\ - /// | | *
|
|||
* | \_| ''\---/'' |_/ | * |
|||
* \ .-\__ '-' ___/-. / * |
|||
* ___'. .' /--.--\ `. .'___ * |
|||
* ."" '< `.___\_<|>_/___.' >' "". * |
|||
* | | : `- \`.;`\ _ /`;.`/ - ` : | | * |
|||
* \ \ `_. \_ __\ /__ _/ .-` / / * |
|||
* =====`-.____`.___ \_____/___.-`___.-'===== * |
|||
* `=---=' * |
|||
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * |
|||
*********__佛祖保佑__永无BUG__验收通过__钞票多多__********* |
|||
*********************************************************/ |
|||
package com.yxt.anrui.oa.biz.adofficesuppliesdetail; |
|||
|
|||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
import org.apache.ibatis.annotations.Select; |
|||
|
|||
import java.util.List; |
|||
|
|||
@Mapper |
|||
public interface AdOfficeSuppliesDetailMapper extends BaseMapper<AdOfficeSuppliesDetail> { |
|||
|
|||
@Select("select * from ad_office_supplies_detail where mainSid = #{mainSid}") |
|||
List<AdOfficeSuppliesDetail> selectByMainSid(String mainSid); |
|||
|
|||
List<AdOfficeSuppliesDetailVo> getUpdateInit(String sid); |
|||
} |
@ -0,0 +1,9 @@ |
|||
<?xml version="1.0" encoding="UTF-8" ?> |
|||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|||
<mapper namespace="com.yxt.anrui.oa.biz.adofficesuppliesdetail.AdOfficeSuppliesDetailMapper"> |
|||
<select id="getUpdateInit" resultType="com.yxt.anrui.oa.biz.adofficesuppliesdetail.AdOfficeSuppliesDetailVo"> |
|||
select * |
|||
from ad_office_supplies_detail |
|||
where mainSid = #{sid} |
|||
</select> |
|||
</mapper> |
@ -0,0 +1,87 @@ |
|||
/********************************************************* |
|||
********************************************************* |
|||
******************** ******************* |
|||
************* ************ |
|||
******* _oo0oo_ ******* |
|||
*** o8888888o *** |
|||
* 88" . "88 * |
|||
* (| -_- |) * |
|||
* 0\ = /0 * |
|||
* ___/`---'\___ * |
|||
* .' \\| |// '. *
|
|||
* / \\||| : |||// \ *
|
|||
* / _||||| -:- |||||- \ * |
|||
* | | \\\ - /// | | *
|
|||
* | \_| ''\---/'' |_/ | * |
|||
* \ .-\__ '-' ___/-. / * |
|||
* ___'. .' /--.--\ `. .'___ * |
|||
* ."" '< `.___\_<|>_/___.' >' "". * |
|||
* | | : `- \`.;`\ _ /`;.`/ - ` : | | * |
|||
* \ \ `_. \_ __\ /__ _/ .-` / / * |
|||
* =====`-.____`.___ \_____/___.-`___.-'===== * |
|||
* `=---=' * |
|||
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * |
|||
*********__佛祖保佑__永无BUG__验收通过__钞票多多__********* |
|||
*********************************************************/ |
|||
package com.yxt.anrui.oa.biz.adofficesuppliesdetail; |
|||
|
|||
import com.yxt.anrui.oa.biz.oaform.FormCommon; |
|||
import com.yxt.common.base.service.MybatisBaseService; |
|||
import org.apache.commons.lang3.StringUtils; |
|||
import org.springframework.stereotype.Service; |
|||
|
|||
import java.math.BigDecimal; |
|||
import java.util.Collections; |
|||
import java.util.List; |
|||
import java.util.Map; |
|||
|
|||
@Service |
|||
public class AdOfficeSuppliesDetailService extends MybatisBaseService<AdOfficeSuppliesDetailMapper, AdOfficeSuppliesDetail> { |
|||
|
|||
public void saveDetails(List<FormCommon> list, String sid) { |
|||
//根据sid查询明细并删除
|
|||
List<AdOfficeSuppliesDetail> list2 = baseMapper.selectByMainSid(sid); |
|||
list2.removeAll(Collections.singleton(null)); |
|||
if (!list2.isEmpty()) { |
|||
list2.stream().forEach(v -> { |
|||
deleteBySid(v.getSid()); |
|||
}); |
|||
} |
|||
list.removeAll(Collections.singleton(null)); |
|||
if (!list.isEmpty()) { |
|||
list.stream().forEach(f -> { |
|||
AdOfficeSuppliesDetail detail = new AdOfficeSuppliesDetail(); |
|||
detail.setMainSid(sid); |
|||
detail.setInventorySid(f.getId()); |
|||
detail.setGoodsSpuName(f.getDictValue()); |
|||
if (null != f.getExtra()) { |
|||
Map<String, Object> e = f.getExtra(); |
|||
for (Map.Entry <String,Object> entry : e.entrySet()) { |
|||
if (StringUtils.isNotBlank((String)entry.getValue())) { |
|||
if (entry.getKey().equals("count")) { |
|||
detail.setCount(new BigDecimal((String)entry.getValue())); |
|||
} |
|||
if (entry.getKey().equals("goodsSkuOwnSpec")) { |
|||
detail.setGoodsSkuOwnSpec((String)entry.getValue()); |
|||
} |
|||
if (entry.getKey().equals("goodsSkuSid")) { |
|||
detail.setGoodsSkuSid((String)entry.getValue()); |
|||
} |
|||
if (entry.getKey().equals("goodsSpuSid")) { |
|||
detail.setGoodsSpuSid((String)entry.getValue()); |
|||
} |
|||
if (entry.getKey().equals("unit")) { |
|||
detail.setUnit((String)entry.getValue()); |
|||
} |
|||
} |
|||
} |
|||
} |
|||
baseMapper.insert(detail); |
|||
}); |
|||
} |
|||
} |
|||
|
|||
public List<AdOfficeSuppliesDetailVo> getUpdateInit(String sid) { |
|||
return baseMapper.getUpdateInit(sid); |
|||
} |
|||
} |
@ -0,0 +1,67 @@ |
|||
/********************************************************* |
|||
********************************************************* |
|||
******************** ******************* |
|||
************* ************ |
|||
******* _oo0oo_ ******* |
|||
*** o8888888o *** |
|||
* 88" . "88 * |
|||
* (| -_- |) * |
|||
* 0\ = /0 * |
|||
* ___/`---'\___ * |
|||
* .' \\| |// '. *
|
|||
* / \\||| : |||// \ *
|
|||
* / _||||| -:- |||||- \ * |
|||
* | | \\\ - /// | | *
|
|||
* | \_| ''\---/'' |_/ | * |
|||
* \ .-\__ '-' ___/-. / * |
|||
* ___'. .' /--.--\ `. .'___ * |
|||
* ."" '< `.___\_<|>_/___.' >' "". * |
|||
* | | : `- \`.;`\ _ /`;.`/ - ` : | | * |
|||
* \ \ `_. \_ __\ /__ _/ .-` / / * |
|||
* =====`-.____`.___ \_____/___.-`___.-'===== * |
|||
* `=---=' * |
|||
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * |
|||
*********__佛祖保佑__永无BUG__验收通过__钞票多多__********* |
|||
*********************************************************/ |
|||
package com.yxt.anrui.oa.biz.adofficesuppliesdetail; |
|||
|
|||
|
|||
import com.yxt.common.core.vo.Vo; |
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* Project: yxt-oa(认定人员) <br/> |
|||
* File: AdExpatriatesDetailVo.java <br/> |
|||
* Class: com.yxt.anrui.oa.api.adexpatriatesdetail.AdExpatriatesDetailVo <br/> |
|||
* Description: 驻外人员认定列表 视图数据对象. <br/> |
|||
* Copyright: Copyright (c) 2011 <br/> |
|||
* Company: https://gitee.com/liuzp315 <br/>
|
|||
* Makedate: 2025-01-20 15:35:08 <br/> |
|||
* |
|||
* @author liupopo |
|||
* @version 1.0 |
|||
* @since 1.0 |
|||
*/ |
|||
@Data |
|||
@ApiModel(value = "驻外人员认定列表 视图数据对象", description = "驻外人员认定列表 视图数据对象") |
|||
public class AdOfficeSuppliesDetailVo implements Vo { |
|||
|
|||
private String sid; |
|||
|
|||
@ApiModelProperty("物品基础信息Sid") |
|||
private String goodsSpuSid; // 物品基础信息Sid
|
|||
@ApiModelProperty("商品名称") |
|||
private String goodsSpuName; // 商品名称
|
|||
@ApiModelProperty("物品Skusid") |
|||
private String goodsSkuSid; // 物品Skusid
|
|||
@ApiModelProperty("规格型号") |
|||
private String goodsSkuOwnSpec; // 规格型号
|
|||
@ApiModelProperty("计量单位") |
|||
private String unit; // 计量单位
|
|||
@ApiModelProperty("库存数量") |
|||
private String count; // 库存数量
|
|||
@ApiModelProperty("库存sid") |
|||
private String inventorySid; // 库存sid
|
|||
} |
@ -0,0 +1,27 @@ |
|||
package com.yxt.wms.biz.inventory.wmsinventory; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.util.Map; |
|||
|
|||
/** |
|||
* @description: |
|||
* @author: dimengzhe |
|||
* @date: 2025/1/16 |
|||
**/ |
|||
@Data |
|||
public class FormCommon { |
|||
|
|||
private String id; |
|||
private String dictValue; |
|||
|
|||
private Map<String, Object> extra; |
|||
|
|||
// 静态方法,直接通过方法创建对象并赋值
|
|||
public static FormCommon of(String id, String dictValue) { |
|||
FormCommon formCommon = new FormCommon(); |
|||
formCommon.setId(id); |
|||
formCommon.setDictValue(dictValue); |
|||
return formCommon; |
|||
} |
|||
} |
Loading…
Reference in new issue