修改交班

This commit is contained in:
牛叉闪闪
2024-07-31 14:00:28 +08:00
parent bd50d13b9a
commit b93cb6c779
2 changed files with 66 additions and 52 deletions

View File

@@ -45,6 +45,7 @@ public class HandoverInfo implements Serializable {
private List<ProductInfo> productInfos;
public HandoverInfo(String merchantName, String startTime, String endTime, String staff, List<PayInfo> payInfos, List<HandoverInfo.MemberData> memberData, String totalAmount, String imprest, String payable, String handIn, String returnAmount, String orderNum
, List<ProductCategory> productCategories, String quickAmount, List<ProductInfoPO> productInfoPOS, List<ProductInfo> productInfos

View File

@@ -70,15 +70,12 @@ public class DataService {
}
ShopUserDuty shopUserDuty=shopUserDutyMapper.selectByPrimaryKey(id);
// ShopUserDuty shopUserDuty=shopUserDutyMapper.selectByShopIdAndDay(tbShopInfo.getId(),tradeDay);
MsgException.checkNull(shopUserDuty,"交班信息不存在");
TbPlussShopStaff shopStaff= tbPlussShopStaffMapper.selectByPrimaryKey(Integer.valueOf(info.get("staffId").toString()));
MsgException.checkNull(shopStaff,"员工信息不存在");
ShopUserDuty shopUserDuty=shopUserDutyMapper.selectByPrimaryKey(id);
if(ObjectUtil.isNotNull(shopUserDuty)&&ObjectUtil.isNotEmpty(shopUserDuty)){
List<HandoverInfo.PayInfo> list=null;
List<HandoverInfo.MemberData> memberData=null;
List<HandoverInfo.ProductCategory> productCategories=null;
@@ -123,8 +120,24 @@ public class DataService {
productInfoPOS,productInfos
);
return Result.success(CodeEnum.SUCCESS,handoverInfo);
}else{
HandoverInfo handoverInfo=new HandoverInfo(tbShopInfo.getShopName(),
ObjectUtil.isNotEmpty(shopUserDuty.getLoginTime())? DateUtils.getTime(shopUserDuty.getLoginTime()):null,
DateUtils.getTime(new Date()),
ObjectUtil.isNull(shopStaff.getName())?"":shopStaff.getName(),
null,null,"0",
"0",
"0",
"0",
"0",
"0",
null,"0",
null,null
);
return Result.success(CodeEnum.SUCCESS,handoverInfo);
}
}