提交 150e5ad2 authored 作者: lgd's avatar lgd

1.mes网络框架

2.//TODO erp用户是否选择新部门为空,质检接口数据无对应问题,内部交易订单审核,审核规则,领用申请列表/退件列表/参数,坩埚下单,mes,刷新token
上级 a7102378
......@@ -1167,6 +1167,22 @@
android:screenOrientation="portrait"
android:theme="@style/Work.Base"
android:windowSoftInputMode="adjustPan" />
<activity
android:name=".ui.activity.mes.MesTicketActivity"
android:configChanges="keyboardHidden|orientation"
android:label="工单管理"
android:launchMode="singleTop"
android:screenOrientation="portrait"
android:theme="@style/Work.Base"
android:windowSoftInputMode="adjustPan" />
<activity
android:name=".ui.activity.mes.MesTicketListActivity"
android:configChanges="keyboardHidden|orientation"
android:label="工单列表"
android:launchMode="singleTop"
android:screenOrientation="portrait"
android:theme="@style/Work.Base"
android:windowSoftInputMode="adjustPan" />
<provider
android:name="androidx.core.content.FileProvider"
android:authorities="com.wd.workoffice.fileprovider"
......
......@@ -7,6 +7,8 @@ import com.scwang.smartrefresh.layout.SmartRefreshLayout;
import com.tencent.bugly.crashreport.CrashReport;
import com.wd.workoffice.R;
import com.wd.workoffice.retrofit.ApiService;
import com.wd.workoffice.retrofit.MesApiService;
import com.wd.workoffice.retrofit.RtfMesHelper;
import com.wd.workoffice.util.UserKeeper;
import cn.jpush.android.api.JPushInterface;
......@@ -31,7 +33,6 @@ public class WorkApp extends BaseApp {
instance = this;
CrashReport.initCrashReport(getApplicationContext(), "8081eafad1", false);
Utils.init(this);
// daoInit();
AutoSizeConfig.getInstance().setCustomFragment(true);
AutoSizeConfig.getInstance().getUnitsManager()
.setSupportDP(false)
......@@ -47,7 +48,16 @@ public class WorkApp extends BaseApp {
return chain.proceed(request);
});
// RtfHelper.getInstance().init(ApiService.DOMAIN);
RtfMesHelper.getInstance().init(MesApiService.DOMAIN, chain -> {
Request original = chain.request();
Request request = original.newBuilder()
.header("Authorization", "Bearer "+UserKeeper.getInstance().getToken())
.header("userId",UserKeeper.getInstance().getUserId())
.method(original.method(), original.body())
.build();
return chain.proceed(request);
});
smartInit();
JPushInterface.setDebugMode(true);
JPushInterface.init(this);
......
package com.wd.workoffice.retrofit;
import com.alibaba.fastjson.JSONObject;
import com.wd.workoffice.app.BaseBean;
import com.wd.workoffice.app.Config;
import com.wd.workoffice.bean.ProDetail;
import java.util.Map;
import io.reactivex.Observable;
import okhttp3.MultipartBody;
import okhttp3.RequestBody;
import retrofit2.Call;
import retrofit2.http.Body;
import retrofit2.http.GET;
import retrofit2.http.Multipart;
import retrofit2.http.POST;
import retrofit2.http.PUT;
import retrofit2.http.Part;
import retrofit2.http.Path;
import retrofit2.http.Query;
import retrofit2.http.QueryMap;
/**
* author : flexible
* email : lgd19940421@163.com
* github: https://github.com/FlexibleXd
**/
public interface MesApiService {
// String DOMAIN = Config.DEBUG ? "http://121.36.41.30:9001/" : "http://zwang.bat100.net.cn:8000/";
String DOMAIN = Config.DEBUG ? "http://zwang.bat100.net.cn:8000/" : "http://zwang.bat100.net.cn:8000/";
/**
* 用户注册
*
* @return
*/
@POST("/open/sys/user/register")
Observable<BaseBean> register(@Body RequestBody requestBody);
/**
* 登录
* grant_type=userNew
* grant_type=phone
*
* @return
*/
@POST("/login")
Call<BaseBean> login(@Query("grant_type") String type, @Body RequestBody requestBody);
/**
*
*
* @return
*/
@POST("/oauth/token?grant_type=refresh_token")
Call<JSONObject> refreshToken(@QueryMap Map<String, Object> param);
/**
* 退出登录
*
* @return
*/
@POST("/authorities/logout")
Observable<BaseBean> logout();
/**
* 激活员工前获取该员工信息
*
* @return
*/
@GET("/open/pre-activation/{phone}")
Observable<BaseBean> preActivationUser(@Path("phone") String phone);
/**
* 忘记密码(短信验证码的方式,重置密码)
*
* @return
*/
@PUT("/open/change-pwd-forget")
Observable<BaseBean> forgetPwd(@Query("phone") String phone,
@Query("verifyCode") String verifyCode, @Query("newPassword") String newPassword);
/**
* 根据旧密码重置密码
*
* @return
*/
@PUT("/sys/user/change-pwd")
Observable<BaseBean> modifyPwd(@Query("oldPassword") String oldPassword,
@Query("newPassword") String newPassword);
/**
* 发送短信验证码
*
* @param phone
* @param type: login、register、alterPwd
* @return
*/
@GET("/open/sms/ckCode/{phone}")
Observable<BaseBean> code(@Path("phone") String phone, @Query("type") String type);
/**
* 验证验证码
*
* @param phone
* @return
*/
@GET("/open/verify-sms-code")
Observable<BaseBean> verifyCode(@Query("phone") String phone,
@Query("verifyCode") String verifyCode, @Query("type") String type);
/**
* 激活员工前获取该员工信息
*
* @return
*/
@GET("/open/pre-activation/{phone}")
Observable<BaseBean> getInfo(@Path("phone") String phone);
/**
* 激活用户
*
* @return
*/
@PUT("/open/activation-user")
Observable<BaseBean> activation(@Body RequestBody requestBody);
/**
* 部门列表
*
* @return
*/
@GET("/open/sys/dept/list")
Observable<BaseBean> depList();
/**
* 根据权限 获取生产厂
*
* @return
*/
@GET("/sub-process/dept-list")
Observable<BaseBean> getDepByPermission(@Query("permission") String permission);
/**
* 根据部门、流程、往来单位获取子流程
*
* @param processCode
* @param transitPartId 往来单位id(客戶id)
* @return
*/
@GET("/sub-process/listByDPT")
Observable<BaseBean> getProcess(@Query("processCode") String processCode, @Query("transitPartId") Integer transitPartId);
/**
* 根据往来单位的类别 获取当前用户所维护的往来单位列表
* <p>
* name
* partTypeCode partTypeCode:SUPPLIER-供应商
* * CUSTOMER-客户
* * TRANSPORTERS-运输商
*
* @return
*/
@GET("/transitpart/page/list/current-user/part-type")
Observable<BaseBean> getClient(@QueryMap Map<String, Object> param);
/**
* 搜索往来单位(回款申请,)
* <p>
* name
* partTypeCode partTypeCode:SUPPLIER-供应商
* * CUSTOMER-客户
* * TRANSPORTERS-运输商
*
* @return
*/
@GET("/transitpart/search-list")
Observable<BaseBean> getClientOut(@QueryMap Map<String, Object> param);
/**
* 根据关联往来单位(类别为客户)和生产厂(产品上架部门) --> 获取产品列表
* <p>
* outDeptId
* transitPartId 销售订单(客户id),外采购订单(供应商id)
* <p>
* processType 销售流程PROCESS_SALE
* 外采购流程PROCESS_PURCHAS
*
* @return
*/
@GET("product/page/list/by/outDept/transit-part")
Observable<BaseBean> getProductList(@QueryMap Map<String, Object> param);
/**
* 仓库
* <p>
* deptId
* customerId
* sign 固定值send
* 供应 参数是3个
* 坩埚的话 内部交易一个参数 deptId
*
* @return
*/
@GET("/stock/search-list")
Observable<BaseBean> getStock(@QueryMap Map<String, Object> param);
/**
* 用户信息
*
* @return
*/
@GET("/sys/user/userInfo")
Observable<BaseBean> userInfo();
/**
* 订单
* <p>
* orderStatus app端订单筛选:
* 100:待审核
* 200:待接单
* 710: 待生产 (已接单、申请提前结束)
* 500:已入库
* 600: 已交付
* 960:已关闭 (审核失败、已拒单、已提前结束)
* identity 1:作为买家(销售部门) 2:作为卖家(生产部门)
*
* @return
*/
@GET("/saleOrder/current-user/page/list")
Observable<BaseBean> getOrder(@QueryMap Map<String, Object> param);
/**
* 外采购订单
* <p>
* orderStatus app端订单筛选:
* 100:待审核
* 200:待接单
* 300 + 410 = 710: 待生产 (已接单、申请提前结束)
* 500:已入库
* 600: 已交付
* 220 + 320 + 420 = 960 :已关闭 (审核失败、已拒单、已提前结束)
* identity 1:作为买家(销售部门) 2:作为卖家(生产部门)
*
* @return
*/
@GET("/purchaseOrder/current-user/page/list")
Observable<BaseBean> getOutOrder(@QueryMap Map<String, Object> param);
/**
* 内部
* <p>
* orderStatus app端订单筛选:
* 100:待审核
* 200:待接单
* 300 + 410 = 710: 待生产 (已接单、申请提前结束)
* 500:已入库
* 600: 已交付
* 220 + 320 + 420 = 960 :已关闭 (审核失败、已拒单、已提前结束)
* identity 1:作为买家(销售部门) 2:作为卖家(生产部门)
*
* @return
*/
@GET("/insideOrder/current-user/page/list")
Observable<BaseBean> getInsideOrder(@QueryMap Map<String, Object> param);
/**
* 供应订单
* <p>
* orderStatus app端订单筛选:
* 100:待审核
* 200:待接单
* 300 + 410 = 710: 待生产 (已接单、申请提前结束)
* 500:已入库
* 220 + 320 + 420 = 960 :已关闭 (审核失败、已拒单、已提前结束)
* identity 1:作为买家(销售部门) 2:作为卖家(生产部门)
*
* @return
*/
@GET("/supplierOrder/current-user/page/list")
Observable<BaseBean> getSupplierOrder(@QueryMap Map<String, Object> param);
/**
* 订单
* <p>
* orderStatus app端订单筛选:
* 100:待审核
* 200:待接单
* 710: 待生产 (已接单、申请提前结束)
* 500:已入库
* 600: 已交付
* 960:已关闭 (审核失败、已拒单、已提前结束)
* identity 1:作为买家(销售部门) 2:作为卖家(生产部门)
*
* @return
*/
@GET("/crucibleOrder/current-user/page/list")
Observable<BaseBean> getCucibleOrder(@QueryMap Map<String, Object> param);
/**
* 订单
* <p>
* orderStatus app端订单筛选:
* 100:待审核
* 200:待接单
* 710: 待生产 (已接单、申请提前结束)
* 500:已入库
* 600: 已交付
* 960:已关闭 (审核失败、已拒单、已提前结束)
* identity 1:作为买家(销售部门) 2:作为卖家(生产部门)
*
* @return
*/
@GET("/crucibleSaleOrder/current-user/page/list")
Observable<BaseBean> getCucibleSaleOrder(@QueryMap Map<String, Object> param);
/**
* 产品列表
* <p>
* processType
* ofKind 产品种类SM:自制成品OS:外购贴牌RM:原料
* statu 冻结标记0冻结1正常
* isExpectOut 是否上架true:上架false:未上架
* searchValue 模糊搜索(图号、名称)
*
* @return
*/
@GET("/product/app/page/list")
Observable<BaseBean> getPro(@QueryMap Map<String, Object> param);
/**
* 产品详情
* transitPartRelList 往来单位关联
* partTypeCode: SUPPLIER-供应商 CUSTOMER-客户 TRANSPORTERS-运输商
* name:往来单位名称
* address:往来单位地址
* accountName:负责人
* deptName:负责部门
* outDeptRelList 上架情况
* createdTime:上架时间
* deptName:上架部门
* outByUserName:上架操作人
*
* @return
*/
@GET("/product/app/detail/{productId}")
Observable<ProDetail> getProDetail(@Path("productId") String id);
/**
* 产品详情
* productId
* current
* size
*
* @return
*/
@GET("/product-price-change/page/list")
Observable<BaseBean> getProHistoryPrice(@QueryMap Map<String, Object> param);
/**
* 产品详情
* internalPrice 价格(内部价格)
* id
* remark
*
* @return
*/
@PUT("/product/price")
Observable<BaseBean> modifyProPrice(@Body RequestBody requestBody);
/**
* 上下架
* shelfAction
* id
*
* @return
*/
@PUT("/product/app/shelf")
// Observable<BaseBean> onSalePro(@Body RequestBody requestBody);
Observable<BaseBean> onSalePro(@QueryMap Map<String, Object> param);
/**
* 下单
* <p>
* customerId 客户ID
* launchUserId 下单用户ID
* launchDeptId 下单部门ID
* receiveDeptId 接单部门ID
* launchOrderAmount下单总金额
* subProcessId 子流程ID
* expandInfo 第二层:订单扩展信息
* 备注: 第二层:订单扩展信息
* <p>
* orderItems
*
* @return
*/
@POST("saleOrder/start")
Observable<BaseBean> submitSaleOrder(@Body RequestBody requestBody);
/**
* 下单
* <p>
* customerId 客户ID
* launchUserId 下单用户ID
* launchDeptId 下单部门ID
* receiveDeptId 接单部门ID
* launchOrderAmount下单总金额
* inStockId 入库仓库id
* expandInfo 第二层:订单扩展信息
* 备注: 第二层:订单扩展信息
* <p>
* orderItems
*
* @return
*/
@POST("/crucibleOrder/start")
Observable<BaseBean> submitCrucibleOrder(@Body RequestBody requestBody);
@POST("/crucibleSaleOrder")
Observable<BaseBean> submitCrucibleSaleOrder(@Body RequestBody requestBody);
/**
* 下单
* <p>
* launchUserId 下单用户ID
* launchDeptId 下单部门ID
* receiveDeptId 接单部门ID
* launchOrderAmount下单总金额
* inStockId 入库仓库id
* expandInfo 第二层:订单扩展信息
* 备注: 第二层:订单扩展信息
* <p>
* orderItems
*
* @return
*/
@POST("/supplierOrder/start")
Observable<BaseBean> submitSupplierOrder(@Body RequestBody requestBody);
/**
* 下单
* <p>
* launchUserId 下单用户ID
* launchDeptId 下单部门ID
* receiveDeptId 接单部门ID
* launchOrderAmount下单总金额
* inStockId 入库仓库id
* expandInfo 第二层:订单扩展信息
* 备注: 第二层:订单扩展信息
*
* <p>
* orderItems
* type 类别 (暂时使用product)
* product(产品)
* service(服务)
*
* @return
*/
@POST("/insideOrder/start")
Observable<BaseBean> submitInsideOrder(@Body RequestBody requestBody);
/**
* 下单
* <p>
* launchUserId 下单用户ID
* launchDeptId 下单部门ID
* receiveDeptId 接单部门ID
* launchOrderAmount下单总金额
* inStockId 入库仓库id
* expandInfo 第二层:订单扩展信息
* customerId
* supplierId
* subProcessId
* 备注: 第二层:订单扩展信息
*
* <p>
* orderItems
*
* @return
*/
@POST("/purchaseOrder/start")
Observable<BaseBean> submitPurchaseOrder(@Body RequestBody requestBody);
@POST("/procedureStart/ao/applyPackage")
Observable<BaseBean> submitProcedureOrder(@Body RequestBody requestBody);
/**
* 获取客户分厂
*
* @param param
* @return
*/
@GET("/customer-branch-factory/page/init")
Observable<BaseBean> getClientFactory(@QueryMap Map<String, Object> param);
/**
* app端往来单位分页列表
*
* @param param
* @return
*/
@GET("/transitpart/app/page/list")
Observable<BaseBean> getContacts(@QueryMap Map<String, Object> param);
/**
* 部门信息
*
* @return
*/
@GET("/dept-account-balance/app/account-balance-info")
Observable<BaseBean> getAccount();
/**
* 获取部门账户的流水
*
* @param param
* @return
*/
@GET("/finance/flow/page/list")
Observable<BaseBean> getFlow(@QueryMap Map<String, Object> param);
/**
* 仓库
*
* @param param stockTypeId 库存类别id
* status 1:启用 0:停用
* isShowByDateDesc 是否按时间倒叙展示
* siteType IN:厂内库 OUT:场外库
* searchKey 按名称模糊搜索时,该参数为name
* searchValue 模糊搜索的关键字
* @return
*/
@GET("/stock/page/list")
Observable<BaseBean> getWarehouse(@QueryMap Map<String, Object> param);
/**
* 仓库
*
* @param param stockTypeId 库存类别id
* status 1:启用 0:停用
* isShowByDateDesc 是否按时间倒叙展示
* siteType IN:厂内库 OUT:场外库
* searchKey 按名称模糊搜索时,该参数为name
* searchValue 模糊搜索的关键字
* @return
*/
@GET("/stockQuantity/app/page/listOfOrder")
Observable<BaseBean> getWareHouseOrder(@QueryMap Map<String, Object> param);
/**
* 获取部门列表(不分页)
*
* @param param includeCO 1包含集团和冻结部门 0:不包含集团和冻结部门(int)
* includeFreeze 包含冻结部门 0:不包含冻结部门(int)
* name
* @return
*/
@GET("/sys/dept/list")
Observable<BaseBean> getDep(@QueryMap Map<String, Object> param);
/**
* 获取部门详情
*
* @param id
* @return
*/
@GET("/sys/dept/{deptId}")
Observable<BaseBean> getDepDetail(@Path("deptId") String id);
/**
* 分页查询仓库类别信息
*
* @return
*/
@GET("/stockType/app/search/list")
Observable<BaseBean> getStockType(@QueryMap Map<String, Object> param);
/**
* 查看往来单位详情
*
* @return
*/
@GET("/transitpart/{id}")
Observable<BaseBean> contactInfo(@Path("id") String id);
/**
* app端从往来单位进入查看收票单
*
* @return
*/
@GET("/receiptInvoiceApply/app/page/list/part")
Observable<BaseBean> receiveTicket(@QueryMap Map<String, Object> param);
/**
* app端从往来单位进入查看开票单
*
* @return
*/
@GET("/invoiceApply/app/page/list/part")
Observable<BaseBean> openTicket(@QueryMap Map<String, Object> param);
/**
* /销售订单开票
*
* @return
*/
@GET("/invoiceApply/so/page/list")
Observable<BaseBean> openSoTicket(@QueryMap Map<String, Object> param);
/**
* 组装订单开票申请分页列表
*
* @return
*/
@GET("/invoiceApply/ao/page/list")
Observable<BaseBean> openAoTicket(@QueryMap Map<String, Object> param);
/**
* 外采购订单开票申请分页列表
*
* @return
*/
@GET("/invoiceApply/po/page/list")
Observable<BaseBean> openPoTicket(@QueryMap Map<String, Object> param);
/**
* 坩埚订单开票申请分页列表
*
* @return
*/
@GET("/invoiceApply/co/page/list")
Observable<BaseBean> openCoTicket(@QueryMap Map<String, Object> param);
/**
* so开票审核
*
* @return
*/
@PUT("/invoiceApply/so/exam")
Observable<BaseBean> soExam(@Body RequestBody requestBody);
/**
* ao开票审核
*
* @return
*/
@PUT("/invoiceApply/ao/exam")
Observable<BaseBean> aoExam(@Body RequestBody requestBody);
/**
* po开票审核
*
* @return
*/
@PUT("/invoiceApply/po/exam")
Observable<BaseBean> poExam(@Body RequestBody requestBody);
/**
* co开票审核
*
* @return
*/
@PUT("/invoiceApply/co/exam")
Observable<BaseBean> coExam(@Body RequestBody requestBody);
/**
* Fo收票审核
*
* @return
*/
@PUT("/receiptInvoiceApply/fo/exam")
Observable<BaseBean> receiveFoExam(@Body RequestBody requestBody);
/**
* po收票审核
*
* @return
*/
@PUT("/receiptInvoiceApply/po/exam")
Observable<BaseBean> receivePoExam(@Body RequestBody requestBody);
/**
* so开票申请
*
* @return
*/
@POST("/invoiceApply/so")
Observable<BaseBean> soApply(@Body RequestBody requestBody);
/**
* fo开票申请
*
* @return
*/
@POST("/invoiceApply/ao")
Observable<BaseBean> aoApply(@Body RequestBody requestBody);
/**
* po开票申请
*
* @return
*/
@POST("/invoiceApply/po")
Observable<BaseBean> poApply(@Body RequestBody requestBody);
/**
* co开票申请
*
* @return
*/
@POST("/invoiceApply/co")
Observable<BaseBean> coApply(@Body RequestBody requestBody);
/**
* fo开票申请
*
* @return
*/
@POST("/receiptInvoiceApply/fo")
Observable<BaseBean> foReceipApply(@Body RequestBody requestBody);
/**
* po开票申请
*
* @return
*/
@POST("/receiptInvoiceApply/po")
Observable<BaseBean> poReceiptApply(@Body RequestBody requestBody);
/**
* 外采购收票分页列表
*
* @return
*/
@GET("/receiptInvoiceApply/po/page/list")
Observable<BaseBean> receivePoTicket(@QueryMap Map<String, Object> param);
/**
* 供应收票申请管理
*
* @return
*/
@GET("/receiptInvoiceApply/fo/page/list")
Observable<BaseBean> receiveFoTicket(@QueryMap Map<String, Object> param);
/**
* 库存数量:一个仓库里的产品列表
*
* @return
*/
@GET("/stockQuantity/app/page/list")
Observable<BaseBean> stockList(@QueryMap Map<String, Object> param);
/**
* 库存数量明细:一个仓库下一个产品里的订单列表
*
* @return
*/
@GET("/stockQuantityDetail/app/page/list")
Observable<BaseBean> stockDetail(@QueryMap Map<String, Object> param);
/**
* 库存数量流水
*
* @return
*/
@GET("/stockQuantityFlow/page/list")
Observable<BaseBean> stockFlow(@QueryMap Map<String, Object> param);
/**
* 库存数量明细流水
*
* @return
*/
@GET("/stockQuantityDetailFlow/page/list")
Observable<BaseBean> stockDetailFlow(@QueryMap Map<String, Object> param);
/**
* 一个订单的详情[从订单列表进入]
*
* @return
*/
@GET("/stockQuantity/app/oneOfOrder/{orderId}")
Observable<BaseBean> stockDetailFlow(@Path("orderId") String id, @Query("orderType") String orderType);
/**
* 获取当前用户的角色,数据、部门权限列表
*
* @return
*/
@GET("/privilege/detail")
Observable<BaseBean> permissionDetail();
/**
* 回款管理
*
* @return
*/
@GET("/moneyBackApply/page/list")
Observable<BaseBean> moneyBack(@QueryMap Map<String, Object> param);
/**
* 付款申请-分页查询
*
* @return
*/
@GET("/moneyPayApply/page/list")
Observable<BaseBean> moneyPay(@QueryMap Map<String, Object> param);
/**
* 获取所有部门账户列表(分页)
*
* @return
*/
@GET("/dept-account-balance/page/list")
Observable<BaseBean> account(@QueryMap Map<String, Object> param);
/**
* app端冻结解冻当前用户所在部门的可用余额
* action冻结(1)解冻(-1)动作判断
* amount操作金额(冻结解冻可用余额)
*
* @return
*/
@PUT("/dept-account-balance/balance")
Observable<BaseBean> freezeOrUnfreezeBalanceShelf(@Body RequestBody requestBody);
/**
* n 获取运费开票申请分页列表
*
* @return
*/
@GET("/finance-logistics-apply/page/list")
Observable<BaseBean> logistic(@QueryMap Map<String, Object> param);
/**
* 发票明细列表
*
* @return
*/
@GET("/invoice-apply/item/list")
Observable<BaseBean> ticketDetail(@Query("applyId") String applyId);
/**
* 发票明细列表
*
* @return
*/
@GET("/receiptInvoiceApplyItem/list")
Observable<BaseBean> ticketReceiveDetail(@Query("applyId") String applyId);
/**
* 获取运费开票详情(开票的运费记录)
*
* @return
*/
@GET("/finance-logistics-apply/detail/page/list")
Observable<BaseBean> logisticsDetail(@Query("applyId") String applyId);
/**
* 审批开票申请
* id
* status 未处理:0 通过:1 驳回:2
* remark
* invoiceNumber
*
* @return
*/
@PUT("/finance-logistics-apply")
Observable<BaseBean> logisticsCheck(@Body RequestBody requestBody);
/**
* 回款申请
* orderType
* applyAmount
* applyDept
* customerId
* process
* applyRemark
*
* @return
*/
@POST("/moneyBackApply/apply")
Observable<BaseBean> moneyBackApply(@Body RequestBody requestBody);
/**
* 付款申请
* orderType
* applyAmount
* applyDept
* customerId
* process
* applyRemark
*
* @return
*/
@POST("/moneyPayApply/apply")
Observable<BaseBean> moneyPayApply(@Body RequestBody requestBody);
/**
* 审批回款
* orderType
* applyAmount
* applyDept
* customerId
* process
* applyRemark
*
* @return
*/
@PUT("/moneyBackApply/exam")
Observable<BaseBean> checkMoneyBack(@Body RequestBody requestBody);
/**
* 付款回款
* orderType
* applyAmount
* applyDept
* customerId
* process
* applyRemark
*
* @return
*/
@PUT("/moneyPayApply/exam")
Observable<BaseBean> checkMoneyPay(@Body RequestBody requestBody);
/**
* 为开票查询的订单
* customerId
* launchDeptId
* searchValue
*
* @return
*/
@GET("/saleOrder/forInvoice")
Observable<BaseBean> saleTicketOrder(@QueryMap Map<String, Object> param);
/**
* 为组装查询的订单
* customerId
* launchDeptId
* searchValue
*
* @return
*/
@GET("/package-order/item/page/list")
Observable<BaseBean> packageTicketOrder(@QueryMap Map<String, Object> param);
/**
* 为外采购查询的订单
* customerId
* launchDeptId
* searchValue
*
* @return
*/
@GET("/purchaseOrder/forInvoice")
Observable<BaseBean> purchaseTicketOrder(@QueryMap Map<String, Object> param);
/**
* /**
* 坩埚订单
* customerId
* launchDeptId
* searchValue
*
* @return
*/
@GET("/crucibleSaleOrder/forInvoice")
Observable<BaseBean> crucibleTicketOrder(@QueryMap Map<String, Object> param);
/**
* 外采购订单
* customerId
* launchDeptId
* searchValue
*
* @return
*/
@GET("/purchaseOrder/item/page/list")
Observable<BaseBean> purchaseOutTicketOrder(@QueryMap Map<String, Object> param);
/**
* 供应订单
* customerId
* launchDeptId
* searchValue
*
* @return
*/
@GET("/supplierOrder/item/page/list")
Observable<BaseBean> supplierTicketOrder(@QueryMap Map<String, Object> param);
/**
* app查看某一往来单位的应收或应付账款
* transitPartId
* type
* AR:应收 AP应付(String)
* searchValue
*
* @return
*/
@GET("/finance-dept-ar-ap-part-detail/app/page/list")
Observable<BaseBean> contactsMoney(@QueryMap Map<String, Object> param);
/**
* 物流账单
* transitPartId
* type
* AR:应收 AP应付(String)
* searchValue
*
* @return
*/
@GET("/finance-logistics/page/list")
Observable<BaseBean> contactsMoneyLogistic(@QueryMap Map<String, Object> param);
/**
* 物流账单
* transitPartId
* type
* AR:应收 AP应付(String)
* searchValue
*
* @return
*/
@GET("/finance-logistics-flow/page/list")
Observable<BaseBean> contactsMoneyLogisticFlow(@QueryMap Map<String, Object> param);
/**
* 部门应收应付账款流水
*
* @return
*/
@GET("/finance-dept-ar-ap-part/flow/page/list")
Observable<BaseBean> contactsMoneyFlow(@QueryMap Map<String, Object> param);
/**
* 部门应收应付账款流水
*
* @return
*/
@GET("/finance-logistics-log/page/list")
Observable<BaseBean> contactsLogistic(@QueryMap Map<String, Object> param);
/**
* 部门应收应付账款流水
*
* @return
*/
@POST("/finance-logistics-apply")
Observable<BaseBean> logisticsApply(@Body RequestBody requestBody);
/**
* 获取财税分页
*
* @return
*/
@GET("/finance-tax/page/list")
Observable<BaseBean> storeFinancial(@QueryMap Map<String, Object> param);
/**
* 修改个人信息,头像和用户名(app)
*
* @return
*/
@Multipart
@POST("/open/uploadImgs")
Observable<JSONObject> upload(@Part MultipartBody.Part avatar);
/**
* 取产品源(获取退货仓库产品数量)
*
* @return
*/
@GET("/stockQuantity/return-stock/page/list")
Observable<BaseBean> tradingPro(@QueryMap Map<String, Object> param);
/**
* 获取产品去向(搜索置换产品)
*
* @return
*/
@GET("/product/search-list")
Observable<BaseBean> tradingProDialog(@Query("soleCode") String soleCode);
/**
* 获取产品去向(搜索置换产品)
*
* @return
*/
@GET("/package-order/app/page/list")
Observable<BaseBean> productList(@QueryMap Map<String, Object> param);
/**
* 获取产品去向(搜索置换产品)
*
* @return
*/
@GET("/packageApply/app/page/list")
Observable<BaseBean> productApplyList(@QueryMap Map<String, Object> param);
/**
*
* @return
*/
@GET("/saleOrder/oneInfo/{orderId}")
Observable<BaseBean> saleOrderDetail(@Path("orderId") String orderId, @Query("type") String type);
/**
*
* @return
*/
@GET("/package-order/oneInfo/{orderId}")
Observable<BaseBean> productOrderDetail(@Path("orderId") String orderId, @Query("type") String type);
/**
*
* @return
*/
@GET("/purchaseOrder/oneInfo/{orderId}")
Observable<BaseBean> purchaseOrderDetail(@Path("orderId") String orderId, @Query("type") String type);
/**
*
* @return
*/
@GET("/insideOrder/oneInfo/{orderId}")
Observable<BaseBean> insideOrderDetail(@Path("orderId") String orderId, @Query("type") String type);
/**
*
* @return
*/
@GET("/crucibleOrder/oneInfo/{orderId}")
Observable<BaseBean> crucibleOrderDetail(@Path("orderId") String orderId, @Query("type") String type);
/**
*
* @return
*/
@GET("/crucibleSaleOrder/oneInfo/{orderId}")
Observable<BaseBean> crucibleSaleOrderDetail(@Path("orderId") String orderId, @Query("type") String type);
/**
*
* @return
*/
@GET("/supplierOrder/oneInfo/{orderId}")
Observable<BaseBean> supplierOrderDetail(@Path("orderId") String orderId, @Query("type") String type);
/**
* 获取发货申请分页列表
*
* @return
*/
@GET("/send-out-store-apply/page/list")
Observable<BaseBean> sendApplyList(@QueryMap Map<String, Object> param);
/**
* 获取发货申请分页列表
*
* @return
*/
@GET("send-out-store-apply/po/page/list")
Observable<BaseBean> sendPoApplyList(@QueryMap Map<String, Object> param);
/**
* 获取发货申请分页列表
*
* @return
*/
@GET("send-out-store-apply/co/page/list")
Observable<BaseBean> sendCoApplyList(@QueryMap Map<String, Object> param);
/**
* 审批发货申请
*
* @return
*/
@PUT("/send-out-store-apply/status")
Observable<BaseBean> sendApplyCheck(@Body RequestBody requestBody);
/**
* 审批发货申请
*
* @return
*/
@PUT("/send-out-store-apply/co/status")
Observable<BaseBean> sendCoApplyCheck(@Body RequestBody requestBody);
/**
* 审批发货申请
*
* @return
*/
@PUT("/send-out-store-apply/po/status")
Observable<BaseBean> sendPoApplyCheck(@Body RequestBody requestBody);
/**
* _3获取发货申请详细信息列表
*
* @return
*/
@GET("/send-out-store-apply/item/list")
Observable<BaseBean> sendApplyDetail(@Query("applyId") String applyId);
/**
* _step6_1发起发货申请
*
* @return
*/
@POST("/procedureStart/so/applyOutStock/{orderId}")
Observable<BaseBean> sendApply(@Path("orderId") String orderId, @Body RequestBody requestBody);
/**
* _step6_1发起发货申请
*
* @return
*/
@POST("/procedureStart/co/applyOutStock/{orderId}")
Observable<BaseBean> sendCoApply(@Path("orderId") String orderId, @Body RequestBody requestBody);
/**
* _step6_1发起发货申请
*
* @return
*/
@POST("/procedureStart/po/applyOutStock/{orderId}")
Observable<BaseBean> sendPoApply(@Path("orderId") String orderId, @Body RequestBody requestBody);
/**
* _step5_1-发起提前结束申请
*
* @return
*/
@POST("/procedureStart/so/applyAdvanceFinish/{orderId}")
Observable<BaseBean> endApply(@Path("orderId") String orderId, @Body RequestBody requestBody);
/**
* step5_3-一个订单的提前结束历史记录
*
* @return
*/
@GET("/advance-finish-apply/so/logs/{orderId}")
Observable<BaseBean> endApplyList(@Path("orderId") String orderId, @QueryMap Map<String, Object> param);
/**
* step5_32-发送销售订单领用申请
*
* @return
*/
@POST("/procedureStart/so/applyUse/{orderId}")
Observable<BaseBean> useApplyAdd(@Path("orderId") String orderId, @Body RequestBody requestBody);
/**
* step5_32-发送销售订单领用申请
*
* @return
*/
@POST("/procedureStart/ao/applyUse/{orderId}")
Observable<BaseBean> useAoApplyAdd(@Path("orderId") String orderId, @Body RequestBody requestBody);
/**
* step8_1-领用申请分页查询
*
* @return
*/
@GET("/useApply/so/page/list")
Observable<BaseBean> useApply(@QueryMap Map<String, Object> param);
/**
* step8_1-领用申请分页查询
*
* @return
*/
@GET("/useApply/ao/page/list")
Observable<BaseBean> useAoApply(@QueryMap Map<String, Object> param);
/**
* step8_3-领用申请审核
*
* @return
*/
@PUT("/useApply/so/audit/{applyId}")
Observable<BaseBean> useApplyCheck(@Path("applyId") String applyId, @Body RequestBody requestBody);
/**
* step8_3-领用申请审核
*
* @return
*/
@PUT("/useApply/ao/audit/{applyId}")
Observable<BaseBean> useAoApplyCheck(@Path("applyId") String applyId, @Body RequestBody requestBody);
/**
* step7_7-退货申请流水列表
*
* @return
*/
@GET("/returnApply/so/page/list")
Observable<BaseBean> returnApplyList(@QueryMap Map<String, Object> param);
/**
* step7_7-退货申请流水列表
*
* @return
*/
@GET("/returnApply/po/page/list")
Observable<BaseBean> returnPoApplyList(@QueryMap Map<String, Object> param);
/**
* step4_1-发起入库申请
*
* @return
*/
@POST("/procedureStart/so/applyStock/{orderItemId}")
Observable<BaseBean> addStockApplyAdd(@Path("orderItemId") String orderItemId, @Body RequestBody requestBody);
/**
* step4_1-发起入库申请
*
* @return
*/
@POST("/procedureStart/co/applyStock/{orderItemId}")
Observable<BaseBean> addStockCoApplyAdd(@Path("orderItemId") String orderItemId, @Body RequestBody requestBody);
/**
* step4_1-发起入库申请
*
* @return
*/
@POST("/procedureStart/io/applyStock/{orderItemId}")
Observable<BaseBean> addStockIoApplyAdd(@Path("orderItemId") String orderItemId, @Body RequestBody requestBody);
/**
* step4_1-发起入库申请
*
* @return
*/
@POST("/procedureStart/fo/applyStock/{orderItemId}")
Observable<BaseBean> addFoStockApplyAdd(@Path("orderItemId") String orderItemId, @Body RequestBody requestBody);
/**
* step4_1-发起入库申请
*
* @return
*/
@POST("/procedureStart/po/applyStock/{orderItemId}")
Observable<BaseBean> addPoStockApplyAdd(@Path("orderItemId") String orderItemId, @Body RequestBody requestBody);
/**
* 入库申请列表
*
* @return
*/
@GET("/enterStoreApply/so/app/page/list")
Observable<BaseBean> addStockApplyList(@QueryMap Map<String, Object> param);
/**
* s入库申请列表
*
* @return
*/
@GET("/enterStoreApply/fo/app/page/list")
Observable<BaseBean> addFoStockApplyList(@QueryMap Map<String, Object> param);
/**
* s入库申请列表
*
* @return
*/
@GET("/enterStoreApply/co/app/page/list")
Observable<BaseBean> addCoStockApplyList(@QueryMap Map<String, Object> param);
/**
* s入库申请列表
*
* @return
*/
@GET("/enterStoreApply/io/app/page/list")
Observable<BaseBean> addIoStockApplyList(@QueryMap Map<String, Object> param);
/**
* step4_3-入库申请列表
*
* @return
*/
@GET("/enterStoreApply/po/app/page/list")
Observable<BaseBean> addPoStockApplyList(@QueryMap Map<String, Object> param);
/**
* /step4_2-入库申请审核
*
* @return
*/
@PUT("/enterStoreApply/po/audit/{id}")
Observable<BaseBean> addPoStockApplyCheck(@Path("id") String id, @Body RequestBody requestBody);
/**
* step4_2-入库申请审核
*
* @return
*/
@PUT("/enterStoreApply/so/audit/{id}")
Observable<BaseBean> addStockApplyCheck(@Path("id") String id, @Body RequestBody requestBody);
/**
* step4_2-入库申请审核
*
* @return
*/
@PUT("/enterStoreApply/fo/audit/{id}")
Observable<BaseBean> addFoStockApplyCheck(@Path("id") String id, @Body RequestBody requestBody);
/**
* step4_2-入库申请审核
*
* @return
*/
@PUT("/enterStoreApply/co/audit/{id}")
Observable<BaseBean> addCoStockApplyCheck(@Path("id") String id, @Body RequestBody requestBody);
/**
* step4_2-入库申请审核
*
* @return
*/
@PUT("/enterStoreApply/io/audit/{id}")
Observable<BaseBean> addIoStockApplyCheck(@Path("id") String id, @Body RequestBody requestBody);
/**
* 质检申请列表
*
* @return
*/
@GET("/enterStoreApply/fo/quality-inspection/page/list")
Observable<BaseBean> enterStoreApplyList(@QueryMap Map<String, Object> param);
/**
* 质检审核
*
* @return
*/
@PUT("/enterStoreApply/fo/quality-inspection/audit/{id}")
Observable<BaseBean> enterFoStoreApplyList(@Path("id") String id, @Body RequestBody requestBody);
/**
* 获取一个订单子表的全部流水
*
* @return
*/
@GET("/orderFlow/orderItem/allFlows/{orderItemId}")
Observable<BaseBean> orderItemFlow(@Path("orderItemId") String orderItemId);
/**
* step2-审核
*
* @return
*/
@PUT("/saleOrder/audit/{orderId}")
Observable<BaseBean> saleOrderCheck(@Path("orderId") String orderId, @Body RequestBody requestBody);
/**
* step2-审核
*
* @return
*/
@PUT("/supplierOrder/audit/{orderId}")
Observable<BaseBean> supplierOrderCheck(@Path("orderId") String orderId, @Body RequestBody requestBody);
/**
* step2-审核
*
* @return
*/
@PUT("/insideOrder/audit/{orderId}")
Observable<BaseBean> insideOrderCheck(@Path("orderId") String orderId, @Body RequestBody requestBody);
/**
* step2-审核
*
* @return
*/
@PUT("/purchaseOrder/audit/{orderId}")
Observable<BaseBean> purchaseOrderCheck(@Path("orderId") String orderId, @Body RequestBody requestBody);
/**
* step2-审核
*
* @return
*/
@PUT("/crucible/audit/{orderId}")
Observable<BaseBean> crucibleOrderCheck(@Path("orderId") String orderId, @Body RequestBody requestBody);
/**
* *获取当前用户某类消息
*
* @return
*/
@GET("/notice-message-item/page/init")
Observable<BaseBean> msg(@QueryMap Map<String, Object> param);
/**
* *把未读标记为已读
*
* @return
*/
@POST("/notice-message-item/has_read")
Observable<BaseBean> msgRead(@Body RequestBody requestBody);
/**
* *把未读标记为已读
*
* @return
*/
@GET("/notice-message-item/content")
Observable<BaseBean> msgContent(@Query("id") String id);
/**
* 设置入库方式
*
* @return
*/
@PUT("/purchaseOrder/enter-stock-type")
Observable<BaseBean> purchaseOrderStockType(@QueryMap Map<String, Object> param);
/**
* 2组装来源列表
*
* @return
*/
@GET("/saleOrder/item/page/list")
Observable<BaseBean> saleOrderPro(@QueryMap Map<String, Object> param);
/**
* 3获取当前客户可组装成品(分页)
*
* @return
*/
@GET("/product/can-package/page/list")
Observable<BaseBean> saleOrderTargetPro(@QueryMap Map<String, Object> param);
/**
* 3获取当前客户可组装成品(分页)
*
* @return
*/
@GET("/package-end/item/list")
Observable<BaseBean> packageEndPro(@Query("applyId") Integer id);
/**
* 3获取当前客户可组装成品(分页)
*
* @return
*/
@GET("/package-source/item/list")
Observable<BaseBean> packageSourcePro(@Query("applyId") Integer id);
/**
* 8组装申请审批
*
* @return
*/
@PUT("/packageApply/exam/{applyId}")
Observable<BaseBean> packageApply(@Path("applyId") String id, @Body RequestBody requestBody);
/**
* 待我审核&&已审核
*
* @return
*/
@GET("/biz-approval/page/list")
Observable<BaseBean> bizApproval(@QueryMap Map<String, Object> param);
/**
* 我发起的审批
*
* @return
*/
@GET("/biz-approval/by-me")
Observable<BaseBean> bizMeApproval(@QueryMap Map<String, Object> param);
/**
* 分页查询公告信息
*
* @return
*/
@GET("/back/noticeAnnounce/page")
Observable<BaseBean> notice(@QueryMap Map<String, Object> param);
/**
* 获取单条公告内容
*
* @return
*/
@GET("/back/noticeAnnounce/{id}")
Observable<BaseBean> noticeDetail(@Path("id") String id);
}
package com.wd.workoffice.retrofit;
import android.util.Log;
import com.franmontiel.persistentcookiejar.ClearableCookieJar;
import com.franmontiel.persistentcookiejar.PersistentCookieJar;
import com.franmontiel.persistentcookiejar.cache.SetCookieCache;
import com.franmontiel.persistentcookiejar.persistence.SharedPrefsCookiePersistor;
import java.io.IOException;
import java.util.concurrent.TimeUnit;
import flexible.xd.android_base.base.BaseApp;
import flexible.xd.android_base.network.rtfhttp.RtfHelper;
import flexible.xd.android_base.network.rtfhttp.conver.FastJsonConverterFactory;
import okhttp3.Interceptor;
import okhttp3.OkHttpClient;
import okhttp3.logging.HttpLoggingInterceptor;
import retrofit2.Retrofit;
import retrofit2.adapter.rxjava2.RxJava2CallAdapterFactory;
/**
* author : flexible
* email : lgd19940421@163.com
**/
public class RtfMesHelper {
private static RtfMesHelper instance;
private String rtfBaseUrl;
private Boolean DEBUG = true;
private int rtfConnectTimeout = 10;
private int rtfReadTimeout = 15;
private int rtfWriteTimeout = 15;
private Retrofit retrofit;
private OkHttpClient.Builder okHttpClient;
private RtfMesHelper() {
}
public static RtfMesHelper getInstance() {
if (instance == null) {
synchronized (RtfHelper.class) {
if (instance == null) {
instance = new RtfMesHelper();
}
}
}
return instance;
}
/**
* 初始化
*
* @param baseUrl
*/
public void init(String baseUrl) {
rtfBaseUrl = baseUrl;
ClearableCookieJar cookieJar = new PersistentCookieJar(new SetCookieCache(), new SharedPrefsCookiePersistor(BaseApp.getAppContext()));
okHttpClient = new OkHttpClient.Builder()
.hostnameVerifier((s, sslSession) -> true)
.cookieJar(cookieJar)
.connectTimeout(rtfConnectTimeout, TimeUnit.SECONDS)
.readTimeout(rtfReadTimeout, TimeUnit.SECONDS)
.writeTimeout(rtfWriteTimeout, TimeUnit.SECONDS);
if (DEBUG) {
//NONE:没有记录
//BASIC:日志请求类型,URL,请求体的大小,响应状态和响应体的大小
//HEADERS:日志请求和响应头,请求类型,URL,响应状态
//BODY:日志请求和响应标头和正文
HttpLoggingInterceptor loggingInterceptor = new HttpLoggingInterceptor(
message -> Log.i("flexible", message)
);
loggingInterceptor.setLevel(HttpLoggingInterceptor.Level.BODY);
okHttpClient.addInterceptor(loggingInterceptor);
}
OkHttpClient okHttpClient = this.okHttpClient.build();
retrofit = new Retrofit.Builder()
.baseUrl(baseUrl)
.client(okHttpClient)
.addConverterFactory(FastJsonConverterFactory.create())
.addCallAdapterFactory(RxJava2CallAdapterFactory.create())
.build();
}
/**
* 初始化
*
* @param baseUrl
*/
public void init(String baseUrl, Interceptor interceptor) {
rtfBaseUrl = baseUrl;
ClearableCookieJar cookieJar = new PersistentCookieJar(new SetCookieCache(), new SharedPrefsCookiePersistor(BaseApp.getAppContext()));
okHttpClient = new OkHttpClient.Builder()
.hostnameVerifier((s, sslSession) -> true)
.cookieJar(cookieJar)
.connectTimeout(rtfConnectTimeout, TimeUnit.SECONDS)
.readTimeout(rtfReadTimeout, TimeUnit.SECONDS)
.writeTimeout(rtfWriteTimeout, TimeUnit.SECONDS);
if (null != interceptor)
okHttpClient.addInterceptor(interceptor);
if (DEBUG) {
//NONE:没有记录
//BASIC:日志请求类型,URL,请求体的大小,响应状态和响应体的大小
//HEADERS:日志请求和响应头,请求类型,URL,响应状态
//BODY:日志请求和响应标头和正文
HttpLoggingInterceptor loggingInterceptor = new HttpLoggingInterceptor(
message -> Log.i("flexible", message)
);
loggingInterceptor.setLevel(HttpLoggingInterceptor.Level.BODY);
okHttpClient.addInterceptor(loggingInterceptor);
}
OkHttpClient okHttpClient = this.okHttpClient.build();
retrofit = new Retrofit.Builder()
.baseUrl(baseUrl)
.client(okHttpClient)
.addConverterFactory(FastJsonConverterFactory.create())
.addCallAdapterFactory(RxJava2CallAdapterFactory.create())
.build();
}
/**
* 初始化
*
* @param baseUrl
*/
public void init(String baseUrl, boolean debug) {
this.DEBUG = debug;
init(baseUrl, null);
}
/**
* 初始化
*
* @param baseUrl
* @param connectTimeout 连接超时时间
* @param readTimeout 读取超时时间
* @param writeTimeout 写入超时时间
*/
public void init(String baseUrl, boolean debug, int connectTimeout, int readTimeout, int writeTimeout) {
rtfConnectTimeout = connectTimeout;
rtfReadTimeout = readTimeout;
rtfWriteTimeout = writeTimeout;
init(baseUrl, debug);
}
public <T> T getApiService(Class<T> t) {
if (rtfBaseUrl == null) {
throw new RuntimeException("you should init first ");
}
return (T) retrofit.create(t);
}
public OkHttpClient.Builder getOkHttpClient() {
if (rtfBaseUrl == null) {
throw new RuntimeException("you should init first ");
}
return okHttpClient;
}
}
......@@ -11,4 +11,7 @@ public class RtfUtils {
public static ApiService getRtf() {
return RtfHelper.getInstance().getApiService(ApiService.class);
}
public static MesApiService getMesRtf() {
return RtfHelper.getInstance().getApiService(MesApiService.class);
}
}
......@@ -39,6 +39,7 @@ import com.wd.workoffice.ui.activity.bat.work.WorkFinancialActivity;
import com.wd.workoffice.ui.activity.bat.work.WorkInStockActivity;
import com.wd.workoffice.ui.activity.bat.work.WorkProActivity;
import com.wd.workoffice.ui.activity.bat.work.WorkWarehouseActivity;
import com.wd.workoffice.ui.activity.mes.MesTicketActivity;
import com.wd.workoffice.ui.adapter.BatLayoutAdapter;
import com.wd.workoffice.util.UserKeeper;
import com.wd.workoffice.util.WorkUtils;
......@@ -138,6 +139,19 @@ public class MesFragment extends WorkBaseFg {
break;
case 5:
break;
case 6:
break;
case 7:
break;
case 8:
break;
case 9:
break;
case 10:
break;
case 11:
startActivity(MesTicketActivity.class);
break;
}
}
});
......
......@@ -13,12 +13,14 @@ import android.widget.TextView;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.wd.workoffice.R;
import com.wd.workoffice.app.Config;
import com.wd.workoffice.app.WorkApp;
import com.wd.workoffice.bean.workEnum.OrderType;
import com.wd.workoffice.bean.workEnum.PermissionType;
import com.wd.workoffice.retrofit.RtfUtils;
import com.wd.workoffice.ui.adapter.StarAdapter;
import java.io.File;
import java.util.ArrayList;
......@@ -26,7 +28,8 @@ import java.util.HashMap;
import java.util.List;
import java.util.Map;
import flexible.xd.android_base.utils.LogUtils;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import okhttp3.MediaType;
import okhttp3.RequestBody;
import retrofit2.Call;
......@@ -265,6 +268,7 @@ public class WorkUtils {
}
});
}
/**
* 判断是否拥有权限
*
......@@ -310,6 +314,19 @@ public class WorkUtils {
return allChildren;
}
/**
* 小星星布局
*
* @return
*/
public static StarAdapter starView(RecyclerView rvData, Context context) {
rvData.setLayoutManager(new LinearLayoutManager(context, RecyclerView.HORIZONTAL, false));
StarAdapter starAdapter = new StarAdapter(R.layout.item_star, null);
starAdapter.bindToRecyclerView(rvData);
return starAdapter;
}
public static File uriToFile(Uri uri, Context context) {
String path = null;
if ("file".equals(uri.getScheme())) {
......
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<solid android:color="#ff007aff" />
<corners android:radius="180mm" />
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<solid android:color="@color/blue_btn" />
<corners android:radius="2dp" />
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<stroke android:color="#D8DCE6" android:width="1dp"/>
<solid android:color="@color/white"/>
<corners android:radius="3dp"/>
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<LinearLayout
android:id="@+id/ll_ticket"
style="@style/llStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10mm"
android:background="@color/white"
android:gravity="center_vertical"
android:orientation="horizontal">
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_weight="1"
android:text="服务工单"
android:textSize="16sp" />
<ImageView
android:layout_width="20mm"
android:layout_height="20mm"
android:background="@mipmap/arrow_right_my" />
</LinearLayout>
<LinearLayout
android:id="@+id/ll_data"
style="@style/llStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10mm"
android:background="@color/white"
android:gravity="center_vertical"
android:orientation="horizontal">
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_weight="1"
android:text="用户数据采集"
android:textSize="16sp" />
<ImageView
android:layout_width="20mm"
android:layout_height="20mm"
android:background="@mipmap/arrow_right_my" />
</LinearLayout>
<LinearLayout
android:id="@+id/ll_quality"
style="@style/llStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10mm"
android:background="@color/white"
android:gravity="center_vertical"
android:orientation="horizontal">
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_weight="1"
android:text="质量反馈"
android:textSize="16sp" />
<ImageView
android:layout_width="20mm"
android:layout_height="20mm"
android:background="@mipmap/arrow_right_my" />
</LinearLayout>
<LinearLayout
android:id="@+id/ll_search"
style="@style/llStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10mm"
android:background="@color/white"
android:gravity="center_vertical"
android:orientation="horizontal">
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_weight="1"
android:text="关联查询"
android:textSize="16sp" />
<ImageView
android:layout_width="20mm"
android:layout_height="20mm"
android:background="@mipmap/arrow_right_my" />
</LinearLayout>
</LinearLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<LinearLayout
android:id="@+id/ll_bottom"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:background="@android:color/white">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingHorizontal="10mm"
android:paddingVertical="8mm"
android:text="暂存"
android:textColor="@color/blue_btn"
android:textSize="14sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/shape_btn_ticket"
android:paddingHorizontal="10mm"
android:paddingVertical="8mm"
android:text="提交"
android:textSize="14sp" />
</LinearLayout>
<androidx.core.widget.NestedScrollView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_above="@id/ll_bottom"
android:paddingHorizontal="10mm"
android:paddingVertical="8mm">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingHorizontal="20mm"
android:paddingVertical="9mm">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="单号:"
android:textSize="14sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="10mm"
android:textSize="14sp" />
</LinearLayout>
<View style="@style/dividerX" />
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingHorizontal="20mm"
android:paddingVertical="9mm">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_centerVertical="true"
android:text="客户"
android:textSize="14sp" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:gravity="center_vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_marginRight="3mm"
android:text="请选择"
android:textColor="@color/flexible_text_gray"
android:textSize="14sp" />
<ImageView
android:layout_width="15mm"
android:layout_height="20mm"
android:src="@mipmap/arrow_right_gray" />
</LinearLayout>
</RelativeLayout>
<View style="@style/dividerX" />
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingHorizontal="20mm"
android:paddingVertical="9mm">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_centerVertical="true"
android:text="销售公司"
android:textSize="14sp" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:gravity="center_vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_marginRight="3mm"
android:text="请选择"
android:textColor="@color/flexible_text_gray"
android:textSize="14sp" />
<ImageView
android:layout_width="15mm"
android:layout_height="20mm"
android:src="@mipmap/arrow_right_gray" />
</LinearLayout>
</RelativeLayout>
<View style="@style/dividerX" />
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingHorizontal="20mm"
android:paddingVertical="9mm">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_centerVertical="true"
android:text="销售经理"
android:textSize="14sp" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:gravity="center_vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_marginRight="3mm"
android:text="请选择"
android:textColor="@color/flexible_text_gray"
android:textSize="14sp" />
<ImageView
android:layout_width="15mm"
android:layout_height="20mm"
android:src="@mipmap/arrow_right_gray" />
</LinearLayout>
</RelativeLayout>
<View style="@style/ViewX" />
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingHorizontal="20mm"
android:paddingVertical="9mm">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_centerVertical="true"
android:text="销售经理"
android:textSize="14sp" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:gravity="center_vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_marginRight="3mm"
android:text="请选择"
android:textColor="@color/flexible_text_gray"
android:textSize="14sp" />
<ImageView
android:layout_width="15mm"
android:layout_height="20mm"
android:src="@mipmap/arrow_right_gray" />
</LinearLayout>
</RelativeLayout>
<View style="@style/dividerX" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingHorizontal="20mm"
android:paddingVertical="13mm"
android:text="任务描述"
android:textSize="14sp" />
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginHorizontal="20mm"
android:layout_marginTop="3mm"
android:background="@drawable/shape_input_white"
android:gravity="top"
android:hint="请输入"
android:minLines="4"
android:padding="5mm"
android:textSize="14sp" />
<View
style="@style/dividerX"
android:layout_marginTop="15mm" />
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingHorizontal="20mm"
android:paddingVertical="9mm">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_centerVertical="true"
android:text="任务担当"
android:textSize="14sp" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:gravity="center_vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_marginRight="3mm"
android:text="请选择"
android:textColor="@color/flexible_text_gray"
android:textSize="14sp" />
<ImageView
android:layout_width="15mm"
android:layout_height="20mm"
android:src="@mipmap/arrow_right_gray" />
</LinearLayout>
</RelativeLayout>
<View style="@style/dividerX" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingHorizontal="20mm"
android:paddingVertical="9mm">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="参与人数"
android:textSize="14sp" />
<EditText
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_marginLeft="10mm"
android:layout_weight="1"
android:background="@null"
android:gravity="right"
android:hint="请输入"
android:padding="3mm"
android:textColor="@color/flexible_text_gray"
android:textSize="14sp" />
</LinearLayout>
<View style="@style/dividerX" />
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingHorizontal="20mm"
android:paddingVertical="9mm">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:text="计划开始时间"
android:textSize="14sp" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true">
<TextView
android:layout_width="100mm"
android:layout_height="wrap_content"
android:layout_marginLeft="10mm"
android:background="@drawable/shape_input_white"
android:gravity="center"
android:padding="5mm"
android:textColor="@color/flexible_text_gray"
android:textSize="14sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginHorizontal="5mm"
android:text="—"
android:textSize="18sp" />
<TextView
android:id="@+id/tv_end_time"
android:layout_width="100mm"
android:layout_height="wrap_content"
android:background="@drawable/shape_input_white"
android:gravity="center"
android:padding="5mm"
android:textColor="@color/flexible_text_gray"
android:textSize="14sp" />
</LinearLayout>
</RelativeLayout>
<View style="@style/dividerX" />
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingHorizontal="20mm"
android:paddingVertical="9mm">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="制单人"
android:textSize="14sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_marginRight="20mm"
android:gravity="center"
android:padding="3mm"
android:textColor="@color/flexible_text_gray"
android:textSize="14sp" />
<ImageView
android:layout_width="13mm"
android:layout_height="13mm"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:src="@mipmap/ticket_close" />
</RelativeLayout>
<View style="@style/dividerX" />
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingHorizontal="20mm"
android:paddingVertical="9mm">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_centerVertical="true"
android:text="制单日期"
android:textSize="14sp" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:gravity="center_vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_marginRight="3mm"
android:text="请选择"
android:textColor="@color/flexible_text_gray"
android:textSize="14sp" />
<ImageView
android:layout_width="15mm"
android:layout_height="20mm"
android:src="@mipmap/arrow_right_gray" />
</LinearLayout>
</RelativeLayout>
<View style="@style/dividerX" />
</androidx.core.widget.NestedScrollView>
</RelativeLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<com.wd.workoffice.widget.DropDownMenu
android:id="@+id/ddm_choose"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:dddividerColor="@color/divider"
app:ddmaskColor="#4d000000"
app:ddmenuBackgroundColor="@color/white"
app:ddmenuMenuHeightPercent="0.5"
app:ddmenuSelectedIcon="@mipmap/main_top"
app:ddmenuTextSize="13sp"
app:ddmenuUnselectedIcon="@mipmap/main_down"
app:ddtextSelectedColor="@color/mainTextColor"
app:ddtextUnselectedColor="@color/main_icon_select"
app:ddunderlineColor="@color/white" />
</LinearLayout>
\ No newline at end of file
......@@ -73,11 +73,11 @@
android:background="@mipmap/my_role" />
<TextView
android:layout_width="wrap_content"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginLeft="@dimen/dp_10"
android:layout_weight="3"
android:layout_marginLeft="10mm"
android:layout_weight="1"
android:text="我的权限"
android:textSize="16sp" />
......@@ -106,11 +106,11 @@
android:background="@mipmap/my_info" />
<TextView
android:layout_width="wrap_content"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginLeft="@dimen/dp_10"
android:layout_weight="3"
android:layout_marginLeft="10mm"
android:layout_weight="1"
android:text="个人资料"
android:textSize="16sp" />
......@@ -139,11 +139,11 @@
android:background="@mipmap/my_setting" />
<TextView
android:layout_width="wrap_content"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginLeft="@dimen/dp_10"
android:layout_weight="3"
android:layout_marginLeft="10mm"
android:layout_weight="1"
android:text="系统设置"
android:textSize="16sp" />
......@@ -153,6 +153,5 @@
android:background="@mipmap/arrow_right_my" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
</androidx.core.widget.NestedScrollView>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginRight="6mm"
android:background="@color/white"
android:orientation="vertical"
>
<ImageView
android:id="@+id/iv_img"
android:layout_width="104mm"
android:layout_height="104mm"
/>
</LinearLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/white"
android:orientation="vertical"
android:paddingHorizontal="14mm"
android:paddingVertical="10mm">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<View
android:layout_width="14mm"
android:layout_height="14mm"
android:background="@drawable/shape_blue_circle" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="5mm"
android:text="2020.04.05"
android:textSize="17sp"
android:textStyle="bold" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="20mm"
android:text="2020.04.05"
android:textSize="17sp"
android:textStyle="bold" />
</LinearLayout>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="35mm"
android:layout_marginTop="14mm"
android:text="作业内容"
android:textColor="@color/blue_bg"
android:textSize="15sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="35mm"
android:layout_marginTop="10mm"
android:text="2020.04.05"
android:textSize="17sp"
android:textStyle="bold" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="35mm"
android:layout_marginTop="14mm"
android:text="作业内容"
android:textColor="@color/blue_bg"
android:textSize="15sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="35mm"
android:layout_marginTop="10mm"
android:text="2020.04.05"
android:textSize="17sp"
android:textStyle="bold" />
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/rv_img"
android:layout_marginLeft="35mm"
android:layout_marginTop="10mm"
android:layout_width="match_parent"
android:layout_height="wrap_content"/>
</LinearLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="6mm"
android:orientation="vertical">
<ImageView
android:id="@+id/iv_img"
android:layout_width="26mm"
android:layout_height="26mm"
android:src="@mipmap/ticket_star_yellow" />
</LinearLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/white"
android:paddingVertical="13mm">
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:text="客户姓名"
android:textSize="12sp" />
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:text="产品名称"
android:textSize="12sp" />
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:text="制单日期"
android:textSize="12sp" />
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:textColor="@color/red"
android:text="任务状态"
android:textSize="12sp" />
</LinearLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<com.scwang.smartrefresh.layout.SmartRefreshLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/srl_refresh"
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingVertical="16mm">
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:text="客户姓名"
android:textColor="@color/flexible_text_sup"
android:textSize="12sp" />
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:text="产品名称"
android:textColor="@color/flexible_text_sup"
android:textSize="12sp" />
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:text="制单日期"
android:textColor="@color/flexible_text_sup"
android:textSize="12sp" />
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:text="任务状态"
android:textColor="@color/flexible_text_sup"
android:textSize="12sp" />
</LinearLayout>
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/rv_data"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@android:color/white" />
</LinearLayout>
</com.scwang.smartrefresh.layout.SmartRefreshLayout>
\ No newline at end of file
......@@ -14,5 +14,6 @@
<color name="orange">#FF5722</color>
<color name="flexible_text_color">#333333</color>
<color name="blue_bg">#5C768A</color>
<color name="blue_btn">#ff0379ff</color>
</resources>
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论